From 9372bdf00e3419dd4fe6fa682b98be4a47a85290 Mon Sep 17 00:00:00 2001 From: Diam Date: Sat, 23 Mar 2024 16:39:23 +0800 Subject: [PATCH] feat: Auto remove "UID:" prefix in bind command --- starbot/commands/builtin/data/bind.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/starbot/commands/builtin/data/bind.py b/starbot/commands/builtin/data/bind.py index 3910eef..a604e4b 100644 --- a/starbot/commands/builtin/data/bind.py +++ b/starbot/commands/builtin/data/bind.py @@ -44,6 +44,9 @@ async def bind(app: Ariadne, uid = remove_command_param_placeholder(uid.display) + # Replace + uid = uid.replace("UID:", "") + if not uid.isdigit() or int(uid) == 0: await app.send_message(sender, MessageChain(f"请输入正确的UID~\n命令示例:{prefix}绑定 114514"), quote=source) return