Sfoglia il codice sorgente

Fix commands being invoked without the prefix

pull/2/head
Jérôme Deuchnord 3 anni fa
parent
commit
8010535b95
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. +4
    -2
      _twitchbot/config.py

+ 4
- 2
_twitchbot/config.py Vedi File

@@ -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:


Caricamento…
Annulla
Salva