mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-12-16 13:40:53 +08:00
🐛 修复同时设置了空和非空的命令前缀时Wiki
使用不正常的问题
This commit is contained in:
parent
9d4d236769
commit
0f0ca49f64
@ -10,7 +10,13 @@ except ImportError:
|
||||
from . import DRIVER
|
||||
|
||||
command_start = list(DRIVER.config.command_start)
|
||||
COMMAND_START_RE = '^' + '|'.join(command_start) if command_start else '^'
|
||||
if len(command_start) == 1 and command_start[0] == '':
|
||||
COMMAND_START_RE = '^'
|
||||
elif '' in command_start:
|
||||
command_start.remove('')
|
||||
COMMAND_START_RE = '^(' + '|'.join(command_start) + ')?'
|
||||
else:
|
||||
COMMAND_START_RE = '^(' + '|'.join(command_start) + ')'
|
||||
|
||||
|
||||
ElementType = Literal['火', '水', '冰', '雷', '风', '岩', '草', '物理']
|
||||
|
Loading…
x
Reference in New Issue
Block a user