Improve upon previous commit.

This commit is contained in:
Krytarik Raido 2023-04-14 16:56:04 +02:00
parent 10a1b41c47
commit d2d25f94d2

View File

@ -62,10 +62,11 @@ def checkAddressed(irc, text, channel):
def isCommand(cbs, args): def isCommand(cbs, args):
for c in cbs: for c in cbs:
if args[0] == c.name().lower() and len(args) > 1:
return isCommand([c], args[1:])
if c.isCommandMethod(args[0]): if c.isCommandMethod(args[0]):
return True return True
if args[0] == c.name().lower() and len(args) > 1 \
and isCommand([c], args[1:]):
return True
if isCommand(c.cbs, args): if isCommand(c.cbs, args):
return True return True