mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -22,6 +22,6 @@ def init(bot):
|
||||
bot.set_my_commands(
|
||||
commands=[
|
||||
telebot.types.BotCommand("start", "查看帮助信息"),
|
||||
telebot.types.BotCommand("faq", "查看bbs帖子主题【不要忘记:冒号】"),
|
||||
telebot.types.BotCommand("?:", "查看bbs帖子主题【不要忘记:冒号】"),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -189,26 +189,22 @@ def run(bot, message):
|
||||
return bot
|
||||
|
||||
# print(text_body)
|
||||
if isThisCmd('/faq:', text_body):
|
||||
cmd_text = getReadCmd('/faq:', text_body)
|
||||
if isThisCmd('/?:', text_body):
|
||||
cmd_text = getReadCmd('/?:', text_body)
|
||||
return searchFaq(bot, message, cmd_text)
|
||||
|
||||
# if isThisCmd('/debug', text_body):
|
||||
# cmd_text = getReadCmd('/debug', text_body)
|
||||
# return searchDebug(bot, message, cmd_text)
|
||||
# if text_body.find('?') > -1 or text_body.find('?') > -1:
|
||||
# return_msg = "你似乎在寻找【" + text_body + "】答案:\n"
|
||||
# return_msg += "/faq:开始寻找你的问题\n"
|
||||
# keyboard = [
|
||||
# [
|
||||
# types.InlineKeyboardButton(
|
||||
# text="如未找到,可以在论坛补充你的提问!", url='https://bbs.midoks.me'),
|
||||
# ]
|
||||
|
||||
if text_body.find('?') > -1 or text_body.find('?') > -1:
|
||||
return_msg = "你似乎在寻找【" + text_body + "】答案:\n"
|
||||
return_msg += "/faq:开始寻找你的问题\n"
|
||||
keyboard = [
|
||||
[
|
||||
types.InlineKeyboardButton(
|
||||
text="如未找到,可以在论坛补充你的提问!", url='https://bbs.midoks.me'),
|
||||
]
|
||||
|
||||
]
|
||||
markup = types.InlineKeyboardMarkup(keyboard)
|
||||
bot.reply_to(message, return_msg, reply_markup=markup)
|
||||
# ]
|
||||
# markup = types.InlineKeyboardMarkup(keyboard)
|
||||
# bot.reply_to(message, return_msg, reply_markup=markup)
|
||||
|
||||
return bot
|
||||
|
||||
|
||||
Reference in New Issue
Block a user