From 9be02d9141c14a3e3ca28567dbaff671de83200f Mon Sep 17 00:00:00 2001 From: Mikhail Kirillov Date: Thu, 10 Oct 2024 04:12:00 +0400 Subject: Fix #9. Add events commands --- main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index 6035f76..fa194f5 100644 --- a/main.py +++ b/main.py @@ -35,6 +35,7 @@ async def unknown(update: Update, context: ContextTypes.DEFAULT_TYPE): text=INVALID_COMMAND ) + async def error_handler(update: object, context: ContextTypes.DEFAULT_TYPE) -> None: logging.error("Exception:", exc_info=context.error) @@ -54,15 +55,20 @@ if __name__ == "__main__": # Meta commands app.add_handler(CommandHandler("about", commands.about)) + # Event commands + app.add_handler(CommandHandler("event", commands.create_event)) + app.add_handler(CommandHandler("events", commands.list_events)) + # Movie commands app.add_handler(CommandHandler("movie", commands.movie)) app.add_handler(CommandHandler("movies", commands.movies)) app.add_handler(CommandHandler("movies_remove", commands.remove_movies)) - + # Users commands app.add_handler(CommandHandler("set", commands.set_users)) app.add_handler(CommandHandler("add", commands.add_users)) app.add_handler(CommandHandler("list", commands.list_users)) + app.add_handler(CommandHandler("users", commands.list_users)) app.add_handler(CommandHandler("remove", commands.remove_users)) app.add_handler(CommandHandler("chooser", commands.chooser_user)) app.add_handler(CommandHandler("next", commands.who_is_next)) -- cgit v1.2.3