mdserver-web/plugins/tgbot/startup/extend/init_cmd.py

33 lines
658 B
Python
Raw Permalink Normal View History

2023-03-16 03:30:43 -04:00
# coding:utf-8
import sys
import io
import os
import time
import re
import json
import base64
import threading
2024-12-01 13:54:17 -05:00
web_dir = os.getcwd() + "/web"
if os.path.exists(web_dir):
sys.path.append(web_dir)
os.chdir(web_dir)
import core.mw as mw
2023-03-16 03:30:43 -04:00
import telebot
from telebot import types
from telebot.util import quick_markup
def init(bot):
bot.delete_my_commands(scope=None, language_code=None)
bot.set_my_commands(
commands=[
telebot.types.BotCommand("start", "查看帮助信息"),
2023-10-13 14:24:45 -04:00
telebot.types.BotCommand("faq", "BBS帮助"),
2023-08-20 08:37:30 -04:00
telebot.types.BotCommand("music", "搜索网易音乐"),
2023-03-16 03:30:43 -04:00
],
)