perf: 支持使用/开头的指令

This commit is contained in:
Soulter committed 2023-04-03 21:44:46 +08:00
1 parent 5b97fd2e6f
commit 291d3ebae8
4 files changed
+26 -22

No files matched your search

+7
View File
@@ -19,6 +19,13 @@ class Command:
return True, self.help()
return False, None
# 接受可变参数
def command_start_with(self, message: str, *args):
for arg in args:
if message.startswith(arg) or message.startswith('/'+arg):
return True
return False
def update(self, message: str):
l = message.split(" ")
if len(l) == 1: