update
This commit is contained in:
parent
e343f33b47
commit
a8a3fa1754
|
|
@ -22,6 +22,6 @@ def init(bot):
|
|||
bot.set_my_commands(
|
||||
commands=[
|
||||
telebot.types.BotCommand("start", "查看帮助信息"),
|
||||
telebot.types.BotCommand("faq", "查看bbs帖子主题【?:】"),
|
||||
telebot.types.BotCommand("faq", "查看bbs帖子主题【/faq:】"),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -191,25 +191,18 @@ def run(bot, message):
|
|||
# print(text_body)
|
||||
if isThisCmd('/?:', text_body):
|
||||
cmd_text = getReadCmd('/?:', text_body)
|
||||
cmd_text = cmd_text.strip().strip(":")
|
||||
if cmd_text == "":
|
||||
return bot.send_message(message.chat.id, "搜索内容不能为空, 例如:/?: 数据库")
|
||||
return searchFaq(bot, message, cmd_text)
|
||||
|
||||
if isThisCmd('/faq:', text_body):
|
||||
cmd_text = getReadCmd('/faq:', text_body)
|
||||
if isThisCmd('/faq', text_body):
|
||||
cmd_text = getReadCmd('/faq', text_body)
|
||||
cmd_text = cmd_text.strip().strip(":")
|
||||
if cmd_text == "":
|
||||
return bot.send_message(message.chat.id, "搜索内容不能为空, 例如:/faq 数据库")
|
||||
return searchFaq(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'),
|
||||
# ]
|
||||
|
||||
# ]
|
||||
# markup = types.InlineKeyboardMarkup(keyboard)
|
||||
# bot.reply_to(message, return_msg, reply_markup=markup)
|
||||
|
||||
return bot
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
|
||||
Loading…
Reference in New Issue