def __command_handlers_github(cls, task_command): handler = Handler() command_handler = None if task_command == 'my_github_token_handler': command_handler = CommandHandler('my_github_token_handler', handler.my_github_token, pass_args=True) elif task_command == 'send_issue_handler': command_handler = CommandHandler('send_issue', handler.send_issue, pass_args=True) return command_handler
def __command_handlers_pass_args(cls, task_command): handler = Handler() command_handler = None if task_command == 'new_handler': command_handler = CommandHandler('new_user', handler.new, pass_args=True) elif task_command == 'delete_handler': command_handler = CommandHandler('remove_user', handler.delete, pass_args=True) return command_handler
def __command_handlers_show(cls, task_command): handler = Handler() command_handler = None if task_command == 'start_handler': command_handler = CommandHandler('start', handler.start) elif task_command == 'help_handler': command_handler = CommandHandler('help', handler.help) elif task_command == 'list_handler': command_handler = CommandHandler('list', handler.list) elif task_command == 'echo_handler': command_handler = MessageHandler(Filters.text, handler.echo) return command_handler
def __command_handlers_show(cls, task_command): handler = Handler() command_handler = None if task_command == 'start_handler': command_handler = CommandHandler('start', handler.start) elif task_command == 'help_handler': command_handler = CommandHandler('help', handler.help) elif task_command == 'help_github_token_handler': command_handler = CommandHandler('help_github_token', handler.help_github_token) elif task_command == 'echo_handler': command_handler = MessageHandler(Filters.text, handler.echo) elif task_command == 'show_priority_handler': command_handler = CommandHandler('show_priority', handler.show_priority) elif task_command == 'list_handler': command_handler = CommandHandler('list', handler.list) return command_handler
def __command_handlers_pass_args(cls, task_command): handler = Handler() command_handler = None if task_command == 'new_handler': command_handler = CommandHandler('new', handler.new, pass_args=True) elif task_command == 'rename_handler': command_handler = CommandHandler('rename', handler.rename, pass_args=True) elif task_command == 'duplicate_handler': command_handler = CommandHandler('duplicate', handler.duplicate, pass_args=True) elif task_command == 'delete_handler': command_handler = CommandHandler('delete', handler.delete, pass_args=True) elif task_command == 'todo_handler': command_handler = CommandHandler('todo', handler.todo, pass_args=True) elif task_command == 'doing_handler': command_handler = CommandHandler('doing', handler.doing, pass_args=True) elif task_command == 'done_handler': command_handler = CommandHandler('done', handler.done, pass_args=True) elif task_command == 'priority_handler': command_handler = CommandHandler('priority', handler.priority, pass_args=True) elif task_command == 'depends_on_handler': command_handler = CommandHandler('depends_on', handler.depends_on, pass_args=True) elif task_command == 'add_date_handler': command_handler = CommandHandler('add_date', handler.add_date, pass_args=True) return command_handler
def __command_handlers_callback(cls, task_command): handler = Handler() command_handler = None if task_command == 'add_date_callback': command_handler = CallbackQueryHandler(handler.add_date_function) return command_handler