A module for create python-telegram-bot with easy and fast
Project description
Introduction
We’ve built the bot framework you’ve been waiting for!
Unlock seamless Telegram bot development with our intuitive, powerful framework. Tap into our thriving community for support and inspiration
Installing
You can install or upgrade ptb-easy-bot via
$ pip install ptb-easy-bot --upgrade
To install a pre-release, use the --pre flag in addition.
Quick Start
from Easy_bot import Client , COMMANDS from telegram import Bot, Update from telegram.ext import ContextTypes import asyncio import os TOKEN = os.environ.get('TOKEN') WEBHOOK_URL = os.environ.get('WEBHOOK_URL', None) PORT = int(os.environ.get('PORT', '8443')) async def main(): if WEBHOOK_URL: bot = Bot(TOKEN) await bot.set_webhook(WEBHOOK_URL + "/" + TOKEN) async def start_command(update: Update, context: ContextTypes.DEFAULT_TYPE): await update.message.reply_text("Hello..") Handlers = { COMMANDS : { 'start' : start_command, }, } if __name__ == '__main__': loop = asyncio.get_event_loop() loop.run_until_complete(main()) app = Client(TOKEN=TOKEN,PORT=PORT,WEBHOOK_URL=WEBHOOK_URL,HANDLERS=Handlers) app.run_polling()
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
ptb-easy-bot-0.0.9.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file ptb-easy-bot-0.0.9.tar.gz
.
File metadata
- Download URL: ptb-easy-bot-0.0.9.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0eb2f4219ce2984ce202581cc5c41949785ded27b28d6be940544b0e5680b4b |
|
MD5 | 44a08eb2b66f12bf7dd8d6b160c7f643 |
|
BLAKE2b-256 | a30e301549430ff676c1f9c2d2f4198440ede5d1b49598de506da30fa0cc99a1 |
Provenance
File details
Details for the file ptb_easy_bot-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: ptb_easy_bot-0.0.9-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 729c5f929b73b567f626f53e451e5fe310626f3a66723fa85cb9b89fb93a0843 |
|
MD5 | 9776f02bee9fe74b6a06b38881631044 |
|
BLAKE2b-256 | 6b186b5177fd463c4788583e9e484b13a8db9c6b3046e2c011d96c839bb7cdb5 |