return txt, reply_markup if SIBYL_KEY and __name__.split(".")[-1] in ALL_MODULES: dispatcher.add_handler( MessageHandler(filters=Filters.group, callback=sibyl_ban), group=101, ) dispatcher.add_handler( MessageHandler(filters=Filters.status_update.new_chat_members, callback=sibyl_ban_alert), group=102, ) dispatcher.add_handler( CommandHandler(command="sibyl", callback=sibylmain), group=110, ) dispatcher.add_handler( CommandHandler(command="start", callback=sibyl_banned), group=113, ) dispatcher.add_handler( DisableAbleCommandHandler(command="check", callback=sibyl_info), ) dispatcher.add_handler( CallbackQueryHandler(sibyltoggle, pattern="sibyl_toggle"), group=111, ) dispatcher.add_handler( CallbackQueryHandler(sibylmain, pattern="sibyl_connect"),
def get_handler(self): return CommandHandler('start', self.handle, filters=self.filter)
def get_handler(self): return CommandHandler('queue', self.handle, filters=self.filter)
msg = "Az aktuális játékod:\nForduló: " + str( game.rounds) + "\nMax Pont: " + str( game.maxPoint) + "\nAktuális forduló: " + str( game.counter) + "\nPontszám: " + str(game.point) update.message.reply_text(msg) def createNewGameAndAddToDict(chatId: int): # Új játék objektum létrehozása a user-nek newGame = Game(chatId) # Új game és user hozzáadása a dictionary-hez games_dict[chatId] = newGame #print(games_dict) updater.dispatcher.add_handler(CommandHandler("start", start)) updater.dispatcher.add_handler(CommandHandler("max", initMaxPoint)) updater.dispatcher.add_handler(CommandHandler("fordulo", initRounds)) updater.dispatcher.add_handler(CommandHandler("restart", restartGame)) updater.dispatcher.add_handler(CommandHandler("game", printGame)) updater.dispatcher.add_handler( MessageHandler(Filters.regex(r"[0-9]"), addPoint)) updater.dispatcher.add_handler(CommandHandler("help", showHelpDialog)) updater.start_polling() # adding the message handler with filter to handle the Option [0-9] regex input # documentation for MessageHandler: https://python-telegram-bot.readthedocs.io/en/stable/telegram.ext.messagehandler.html # documentation for Filter: https://python-telegram-bot.readthedocs.io/en/stable/telegram.ext.filters.html#telegram.ext.filters.Filters