简单的类,可以方便地调用telegram bot api
lazybot的Python项目详细描述
懒汉
一个简单的类,它可以调用任意方法并向bot api发出电报请求。
但为什么呢?
在编写我的userbot时,我想要一种简单的方法来调用bot api,而不需要一个带有处理程序等的完整库。
医生在哪里?
使用Telegram Docs和以下示例作为基础。
import lazybot
bot = lazybot.Bot('TOKEN')
# you can use snake case
bot.send_message(chat_id=123456, text='Text')
# or camelCase
bot.sendMessage(chat_id=123456, text='Text')
安装
pip install lazybot