Socket
Socket
Sign inDemoInstall

bonfire-tg

Package Overview
Dependencies
3
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bonfire-tg

telegram api libraly


Maintainers
1

Readme

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()

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc