summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorMikhail Kirillov <w96k@runbox.com>2024-10-10 04:12:00 +0400
committerMikhail Kirillov <w96k@runbox.com>2024-10-10 04:12:00 +0400
commit9be02d9141c14a3e3ca28567dbaff671de83200f (patch)
treeecc8c2f7023654179d51e2fdee68b1d688c131d8 /main.py
parent662342863e37e8661f818218df7bb72bc18bf4eb (diff)
Fix #9. Add events commands
Diffstat (limited to 'main.py')
-rw-r--r--main.py8
1 files changed, 7 insertions, 1 deletions
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))