- Timestamp:
- Oct 9, 2024, 10:46:19 PM (5 weeks ago)
- Branches:
- master
- Children:
- 9be02d9
- Parents:
- 0d48ea2
- git-author:
- Mikhail Kirillov <w96k@…> (10/09/24 04:53:26)
- git-committer:
- Mikhail Kirillov <w96k@…> (10/09/24 22:46:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main.py
r0d48ea2 r6623428 17 17 import logging 18 18 19 from strings import INVALID_COMMAND 19 from strings import INVALID_COMMAND, UNDEFINED_ERROR 20 20 from persistence import Persistence 21 21 import commands … … 39 39 logging.error("Exception:", exc_info=context.error) 40 40 41 error_message = context.error.message \ 42 if hasattr(context.error, "message") else UNDEFINED_ERROR 43 41 44 await context.bot.send_message( 42 45 chat_id=update.effective_chat.id, 43 text= context.error.message46 text=error_message 44 47 ) 45 48 … … 53 56 54 57 # Movie commands 58 app.add_handler(CommandHandler("movie", commands.movie)) 59 app.add_handler(CommandHandler("movies", commands.movies)) 60 app.add_handler(CommandHandler("movies_remove", commands.remove_movies)) 61 62 # Users commands 55 63 app.add_handler(CommandHandler("set", commands.set_users)) 56 64 app.add_handler(CommandHandler("add", commands.add_users)) … … 58 66 app.add_handler(CommandHandler("remove", commands.remove_users)) 59 67 app.add_handler(CommandHandler("chooser", commands.chooser_user)) 68 app.add_handler(CommandHandler("next", commands.who_is_next)) 60 69 61 70 app.add_handler(MessageHandler(filters.COMMAND, unknown))
Note:
See TracChangeset
for help on using the changeset viewer.