Example #1
0
async def get_commands(message: types.Message):
    markup = ReplyKeyboardMarkup(resize_keyboard=True, one_time_keyboard=True)
    missed_katas = KeyboardButton("Get list of unsolved katas")
    markup.add(missed_katas)
    await bot.send_message(message.chat.id,
                           text="Here is commands",
                           reply_markup=markup)
Example #2
0
def main_menu_btn():
    keyboard = ReplyKeyboardMarkup(resize_keyboard=True, row_width=1)
    #keyboard.add(_('Анонсы'), _('Выбор блокчейна'),
    #             _('FAQ'), _('Настройки'),
    #             _('Быстрая конвертация'),
    #             _('Мои кошельки'), _('Залистить проект')
    #             )
    keyboard.add(_('Анонсы'), _('Мои кошельки'), _('Настройки'), _('Партнеры'))
    return keyboard
Example #3
0
def home_kb():
    keyboard = ReplyKeyboardMarkup(resize_keyboard=True,
                                   one_time_keyboard=True)
    add_validator_btn = KeyboardButton(config.ADD_VALIDATOR)
    remove_validator_btn = KeyboardButton(config.REMOVE_VALIDATOR)
    status_btn = KeyboardButton(config.STATUS)
    stats_btn = KeyboardButton(config.STATS)
    donate_btn = KeyboardButton(config.DONATE)
    keyboard.add(add_validator_btn, remove_validator_btn, status_btn,
                 stats_btn, donate_btn)
    return keyboard
Example #4
0
def settings_btn():
    keyboard = ReplyKeyboardMarkup(resize_keyboard=True, row_width=2)
    keyboard.add(_('Сменить язык'))
    return keyboard
Example #5
0
def reply_keyboard(*buttons, row_width=3):
    """ Собирает по полученным кнопкам клавиатуру """
    kb = ReplyKeyboardMarkup(row_width=row_width, resize_keyboard=True)
    keys = [KeyboardButton(text=btn.value) for btn in buttons]
    kb.add(*keys)
    return {'keyboard': kb, 'buttons': buttons}
Example #6
0
 def get_end_conversation_keyboard(cls):
     markup = ReplyKeyboardMarkup(row_width=1)
     markup.add(KeyboardButton(str(cls.COMPLETE_CONVERSATION_BTN)))
     return markup
Example #7
0
 def get_cancel_waiting_opponent_keyboard(cls):
     markup = ReplyKeyboardMarkup(row_width=1)
     markup.add(KeyboardButton(str(cls.CANCEL_WAITING_OPPONENT_BTN)))
     return markup
Example #8
0
 def get_menu_keyboard(cls):
     markup = ReplyKeyboardMarkup(row_width=1)
     markup.add(KeyboardButton(str(cls.START_CONVERSATION_BTN)))
     return markup