-
Notifications
You must be signed in to change notification settings - Fork 0
QuickestPossible🍕
MohammadReza edited this page May 12, 2022
·
5 revisions
This is almost the quickest way you can setup an handler and listen for updates.
from telegrambots.custom import TelegramBot, MessageContext, filters as flts
bot = TelegramBot("BOT_TOKEN")
dp = bot.dispatcher
@dp.add.handlers.via_decorator.message(
flts.messages.Regex("^/start") & flts.messages.private
)
async def starting(context: MessageContext):
await context.reply_text("Started")
if __name__ == "__main__":
dp.unlimited("message")
Here we have funny usage examples of Custom-TelegramBots. with the taste of some fast foods 🍿.