def start(bot, update):
"""
Shows an welcome message and help info about the available commands.
"""
me = bot.get_me()
# Welcome message
msg = _("Hello!\n")
msg += _("I'm {0} and I came here to help you.\n").format(me.first_name)
msg += _("What would you like to do?\n\n")
msg += _("/support - Opens a new support ticket\n")
msg += _("/settings - Settings of your account\n\n")
# Commands menu
main_menu_keyboard = [[telegram.KeyboardButton('/support')],
[telegram.KeyboardButton('/settings')]]
reply_kb_markup = telegram.ReplyKeyboardMarkup(main_menu_keyboard,
resize_keyboard=True,
one_time_keyboard=True)
# Send the message with menu
bot.send_message(chat_id=update.message.chat_id,
text=msg,
reply_markup=reply_kb_markup)
评论列表
文章目录