def map(pos): if (pos == 1): button = [[InlineKeyboardButton(text='-->', callback_data="help+2")]] elif (pos == len(tr.HELP_MSG) - 1): auth = GoogleAuth(Config.CLIENT_ID, Config.CLIENT_SECRET) url = auth.GetAuthUrl() button = [ [InlineKeyboardButton(text='<--', callback_data=f"help+{pos-1}")], [ InlineKeyboardButton(text='Autentifikatsiya URL manzili📎', url=url) ] ] else: button = [ [ InlineKeyboardButton(text='<--', callback_data=f"help+{pos-1}"), InlineKeyboardButton(text='-->', callback_data=f"help+{pos+1}") ], ] return button
def map_btns(pos): if pos == 1: button = [ [InlineKeyboardButton(text = '-->', callback_data = "help+2")] ] elif pos == len(tr.HELP_MSG)-1: auth = GoogleAuth(Config.CLIENT_ID, Config.CLIENT_SECRET) url = auth.GetAuthUrl() button = [ [InlineKeyboardButton(text = '<--', callback_data = f"help+{pos-1}")], [InlineKeyboardButton(text = 'Authentication URL', url = url)] ] else: button = [ [ InlineKeyboardButton(text = '<--', callback_data = f"help+{pos-1}"), InlineKeyboardButton(text = '-->', callback_data = f"help+{pos+1}") ], ] return button