mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
🎨 修改部分命令并更新 help
命令列表
This commit is contained in:
parent
8f424bf0d4
commit
84a06e915b
@ -32,15 +32,15 @@ class AddUserCommandData(TelegramObject):
|
||||
CHECK_SERVER, CHECK_COOKIES, COMMAND_RESULT = range(10100, 10103)
|
||||
|
||||
|
||||
class AddUser(Plugin.Conversation, BasePlugin.Conversation):
|
||||
"""用户绑定"""
|
||||
class SetUserCookies(Plugin.Conversation, BasePlugin.Conversation):
|
||||
"""Cookie绑定"""
|
||||
|
||||
def __init__(self, user_service: UserService = None, cookies_service: CookiesService = None):
|
||||
self.cookies_service = cookies_service
|
||||
self.user_service = user_service
|
||||
|
||||
@conversation.entry_point
|
||||
@handler.command(command='adduser', filters=filters.ChatType.PRIVATE, block=True)
|
||||
@handler.command(command='setcookies', filters=filters.ChatType.PRIVATE, block=True)
|
||||
@restricts()
|
||||
@error_callable
|
||||
async def command_start(self, update: Update, context: CallbackContext) -> int:
|
@ -28,7 +28,7 @@ class AddUserCommandData(TelegramObject):
|
||||
CHECK_SERVER, CHECK_UID, COMMAND_RESULT = range(10100, 10103)
|
||||
|
||||
|
||||
class SetUid(Plugin.Conversation, BasePlugin.Conversation):
|
||||
class SetUserUid(Plugin.Conversation, BasePlugin.Conversation):
|
||||
"""UID用户绑定"""
|
||||
|
||||
def __init__(self, user_service: UserService = None, cookies_service: CookiesService = None,
|
||||
@ -38,7 +38,7 @@ class SetUid(Plugin.Conversation, BasePlugin.Conversation):
|
||||
self.user_service = user_service
|
||||
|
||||
@conversation.entry_point
|
||||
@handler.command(command='set_uid', filters=filters.ChatType.PRIVATE, block=True)
|
||||
@handler.command(command='setuid', filters=filters.ChatType.PRIVATE, block=True)
|
||||
@restricts()
|
||||
@error_callable
|
||||
async def command_start(self, update: Update, context: CallbackContext) -> int:
|
||||
@ -49,7 +49,8 @@ class SetUid(Plugin.Conversation, BasePlugin.Conversation):
|
||||
if add_user_command_data is None:
|
||||
cookies_command_data = AddUserCommandData()
|
||||
context.chat_data["add_uid_command_data"] = cookies_command_data
|
||||
text = f'你好 {user.mention_markdown_v2()} {escape_markdown("!请选择要绑定的服务器!或回复退出取消操作")}'
|
||||
text = f'你好 {user.mention_markdown_v2()} ' \
|
||||
f'{escape_markdown("!本次绑定只绑定UID,未绑定Cookies部分功能无法使用。请选择要绑定的服务器!或回复退出取消操作")}'
|
||||
reply_keyboard = [['米游社', 'HoYoLab'], ["退出"]]
|
||||
await message.reply_markdown_v2(text, reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True))
|
||||
return CHECK_SERVER
|
@ -115,10 +115,13 @@
|
||||
派蒙的十万个为什么
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="command">
|
||||
<div class="command-name">/adduser</div>
|
||||
<div class="command-description">添加账号(请私聊BOT)</div>
|
||||
<div class="command-name">/setuid</div>
|
||||
<div class="command-description">添加UID(请私聊BOT)</div>
|
||||
</div>
|
||||
<div class="command">
|
||||
<div class="command-name">/setcookies</div>
|
||||
<div class="command-description">添加Cookies(请私聊BOT)</div>
|
||||
</div>
|
||||
<div class="command rounded-xl flex-1">
|
||||
<div class="command-name">/cancel</div>
|
||||
|
Loading…
Reference in New Issue
Block a user