瀏覽代碼

Fix commands being invoked without the prefix

pull/2/head
Jérôme Deuchnord 3 年之前
父節點
當前提交
8010535b95
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      _twitchbot/config.py

+ 4
- 2
_twitchbot/config.py 查看文件

@@ -148,8 +148,10 @@ class Config:
)

def find_command(self, command: str) -> Union[None, Command]:
if command.startswith(self.command_prefix):
command = command[1:]
if not command.startswith(self.command_prefix):
return None

command = command[1:]

for c in self.commands:
if c.name == command or command in c.aliases:


Loading…
取消
儲存