Alby7503TBot-1.0.9
توضیحات
Lightweight telegram bot library.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | Alby7503TBot-1.0.9 |
| نام | Alby7503TBot |
| نسخه کتابخانه | 1.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Alberto Vona |
| ایمیل نویسنده | alberto.vona24@gmail.com |
| آدرس صفحه اصلی | https://github.com/Alby7503/TBot |
| آدرس اینترنتی | https://pypi.org/project/Alby7503TBot/ |
| مجوز | GNU AGPLv3 |
# TBot
## Lightweight telegram bot library for python.
<br>
```
"""example.py"""
from TBot import TBot
BOT = TBot("<token>")
BOT.update_frequence = 0.5 # seconds
@BOT.command("/help")
def help_command(event):
"""Help command handler"""
BOT.send(event, "Help Message")
@BOT.command("/chat")
def chat(event):
"""Send chat id"""
group = BOT.get_chat(event)
if group:
args = ["title", "type", "id"]
message = ""
for i in args:
message += i.capitalize() + ': ' + str(getattr(group, i)) + "\n"
BOT.send(event, message)
@BOT.command("*")
def generic(event):
"""Generic command fallback"""
BOT.send(event, "You said: " + event.text)
BOT.run()
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl Alby7503TBot-1.0.9:
pip install Alby7503TBot-1.0.9.whl
نصب پکیج tar.gz Alby7503TBot-1.0.9:
pip install Alby7503TBot-1.0.9.tar.gz