bot-python icon indicating copy to clipboard operation
bot-python copied to clipboard

Flask-style dispatcher

Open Olegt0rr opened this issue 4 years ago • 3 comments

Flask-style dispatcher look pretty and simple. It reduces entry threshold for beginners. It makes code more clear and readable

@bot.message_handler(filters)
def function_name(message):
    bot.reply_to(message, "This is a message handler")

Reference: aiogram pyTelegramBotAPI

Olegt0rr avatar Jun 07 '20 22:06 Olegt0rr

I actually made this: https://github.com/kamuridesu/ICQBotPy lmao

kamuridesu avatar Jul 13 '22 19:07 kamuridesu

I actually made this: https://github.com/kamuridesu/ICQBotPy lmao

Actually it looks like even more mess than official library. BTW official library already have this style events dispatcher since long time ago 🤷‍♂️

robert-cody avatar Jul 16 '22 05:07 robert-cody

I actually made this: https://github.com/kamuridesu/ICQBotPy lmao

Actually it looks like even more mess than official library. BTW official library already have this style events dispatcher since long time ago man_shrugging

As this is my first time programming pip modules and frameworks to be used by other people, the main goal was to gain experience. Can you help me by telling me what's wrong with it and how to improve it?

kamuridesu avatar Jul 18 '22 11:07 kamuridesu