bonfire
bonfire this framework for Telegram Bot API built on requests
instaling
git clone https://github.com/Help-urself/bonfire
or
pip install bonfire-tg
Examples
Click
import os
import sys
sys.path.append(os.path.abspath('you path to bonfire'))
from bonfire import *
from bonfire.methods import *
token = "TOKEN"
msg = message(token)
@bot.handler(token,command="/start")
def start():
send_message(token,chat_id=msg.chat_id,text=f"<b>Hello </b> @{msg.author_username}",parse_mode='HTML')
if __name__ == '__main__':
while True:
if bot.status(token) == "ok":
bot.start_command(sys.modules[__name__])
bot.end_status(token)
bot.start(token).start()
import os
import sys
from bonfire import *
from bonfire.methods import *
token = "TOKEN"
msg = message(token)
@bot.handler(token,command="/start")
def start():
send_message(token,chat_id=msg.chat_id,text=f"<b>Hello </b> @{msg.author_username}",parse_mode='HTML')
if __name__ == '__main__':
while True:
if bot.status(token) == "ok":
bot.start_command(sys.modules[__name__])
bot.end_status(token)
bot.start(token).start()