- Timestamp:
- Oct 9, 2024, 3:40:27 AM (5 weeks ago)
- Branches:
- master
- Children:
- 6623428
- Parents:
- cc34991
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main.py
rcc34991 r0d48ea2 36 36 ) 37 37 38 async def error_handler(update: object, context: ContextTypes.DEFAULT_TYPE) -> None: 39 logging.error("Exception:", exc_info=context.error) 40 41 await context.bot.send_message( 42 chat_id=update.effective_chat.id, 43 text=context.error.message 44 ) 38 45 39 46 if __name__ == "__main__": … … 42 49 ).persistence(Persistence).build() 43 50 51 # Meta commands 44 52 app.add_handler(CommandHandler("about", commands.about)) 53 54 # Movie commands 55 app.add_handler(CommandHandler("set", commands.set_users)) 45 56 app.add_handler(CommandHandler("add", commands.add_users)) 46 57 app.add_handler(CommandHandler("list", commands.list_users)) … … 48 59 app.add_handler(CommandHandler("chooser", commands.chooser_user)) 49 60 61 app.add_handler(MessageHandler(filters.COMMAND, unknown)) 62 app.add_error_handler(error_handler) 50 63 51 app.add_handler(MessageHandler(filters.COMMAND, unknown))52 64 53 65 app.run_polling() 66
Note:
See TracChangeset
for help on using the changeset viewer.