telegram api libraly
Project description
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
Simple send_message
request
#git clone
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")#command handler
def start():
send_message(token,chat_id=msg.chat_id,text=f"<b>Hello </b> @{msg.author_username}",parse_mode='HTML')#send message
if __name__ == '__main__':
while True:
if bot.status(token) == "ok": #do not edit everything in startup
bot.start_command(sys.modules[__name__])
bot.end_status(token)
bot.start(token).start()
#git clone
import os
import sys
from bonfire import *
from bonfire.methods import *
token = "TOKEN"
msg = message(token)
@bot.handler(token,command="/start")#command handler
def start():
send_message(token,chat_id=msg.chat_id,text=f"<b>Hello </b> @{msg.author_username}",parse_mode='HTML')#send message
if __name__ == '__main__':
while True:
if bot.status(token) == "ok": #do not edit everything in startup
bot.start_command(sys.modules[__name__])
bot.end_status(token)
bot.start(token).start()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bonfire_tg-1.1.0.tar.gz
(7.0 kB
view hashes)
Built Distribution
bonfire_tg-1.1.0-py3-none-any.whl
(10.6 kB
view hashes)
Close
Hashes for bonfire_tg-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd52d9ab410c926572d5fcfe80d3d8a4a62bf84bf500d196d08bb349dcfaeae8 |
|
MD5 | f78885b6d9b4e1cd7dfb9fd778611000 |
|
BLAKE2b-256 | 13e3fca66095db2aadf380cd5cb5a0b87ffe8ed23faecdc92d5b564838d8cb74 |