def add_repo_command(update, context): repos = context.chat_data.setdefault('repos', {}) access_token = context.user_data['access_token'] repo_id = decode_first_data_entity(update.effective_message.entities) if not repo_id: update.effective_message.reply_text( 'Please use /settings to add repositories, instead of using the command directly.' ) return repository = github_api.get_repository(repo_id, access_token=access_token) repos[repository['id']] = Repo(name=repository['full_name'], id=repository['id']) context.menu_stack = ['settings'] reply_menu(update, context, repos_menu)
def login_handler(update: Update, context): context.menu_stack = ['settings'] reply_menu(update, context, settings.login_menu)
def settings_command(update, context): if context.args: context.menu_stack = context.args reply_menu(update, context, settings_menu)