def to_main_menu(update, context, message=None): main_menu_message = strings.get_string( 'main_menu', context.user_data['user'].language) if message: main_menu_message = message main_menu_keyboard = keyboards.get_keyboard( 'main_menu', context.user_data['user'].language) if update.message: update.message.reply_text(text=main_menu_message, reply_markup=main_menu_keyboard, parse_mode=ParseMode.HTML) else: context.bot.send_message(chat_id=update.effective_chat.id, reply_markup=main_menu_keyboard, text=main_menu_message, parse_mode=ParseMode.HTML)
def filter(self, message): return message.text and ( (strings.get_string('cancel', 'ru') in message.text) or (strings.get_string('cancel', 'uz') in message.text))
def filter(self, message): return message.text and ( (strings.get_string('menu.share', 'ru') in message.text) or strings.get_string('menu.share', 'uz') in message.text)
def filter(self, message): return message.text and ( (strings.get_string('menu.need_help', 'ru') in message.text) or (strings.get_string('menu.need_help', 'uz') in message.text))