def show_settings(bot, update):
chat = update.message.chat
if update.message.chat.type != 'private':
send_async(bot, chat.id,
text=_("Please edit your settings in a private chat with "
"the bot."))
return
us = UserSetting.get(id=update.message.from_user.id)
if not us:
us = UserSetting(id=update.message.from_user.id)
if not us.stats:
stats = '??' + ' ' + _("Enable statistics")
else:
stats = '?' + ' ' + _("Delete all statistics")
kb = [[stats], ['??' + ' ' + _("Language")]]
send_async(bot, chat.id, text='??' + ' ' + _("Settings"),
reply_markup=ReplyKeyboardMarkup(keyboard=kb,
one_time_keyboard=True))
评论列表
文章目录