Skip to content

Commit 2da8bd6

Browse files
fix(Core): 修复大写指令无效的问题
1 parent b19ecd3 commit 2da8bd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/bot/decorator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def decorator(func):
2929
__commands__[module_name] = {}
3030

3131
for token in tokens:
32-
token_name = f'/{token}' if is_command else f'{token}'
32+
token_name = (f'/{token}' if is_command else f'{token}').lower() # 忽略大小写直接匹配
3333
__commands__[module_name][token_name] = (
3434
func, permission_level, is_command, multi_thread)
3535
return func

0 commit comments

Comments
 (0)