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()
#pip install
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.1.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bonfire_tg-1.1.1.tar.gz.
File metadata
- Download URL: bonfire_tg-1.1.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63d0b745381f75c9aefc075e1567247dd96b477a4fc47afa852ff5c71e62a18a
|
|
| MD5 |
8d7ddf67b76af8df5f5438bf47e3c940
|
|
| BLAKE2b-256 |
06a1d9d2c9641617c89be785ccf698377978404bff9ecc6dc8d80edf7041ba2a
|
File details
Details for the file bonfire_tg-1.1.1-py3-none-any.whl.
File metadata
- Download URL: bonfire_tg-1.1.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8064273bbb1cb43434935613a93bc92e94cb71848f82fca1aa5b1ea9a48a004d
|
|
| MD5 |
0c6c51485089a4e700cfea5cc420d032
|
|
| BLAKE2b-256 |
66559893f327ac148ecf3d4a30d5f4716b6b687e2d62ed1d5869c07950774b69
|