mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
prepare for action_commands decorator
This commit is contained in:
parent
77bcf63076
commit
2e37fc5c59
@ -291,6 +291,10 @@ class BotCommands():
|
||||
line = str(line).split("commands")[-1]
|
||||
line = "commands" + line
|
||||
detected_lines.append(line)
|
||||
elif str(line).startswith(tuple(["action_commands", "module.action_commands", "sopel.module.action_commands"])):
|
||||
line = str(line).split("action_commands")[-1]
|
||||
line = "action_commands" + line
|
||||
detected_lines.append(line)
|
||||
elif str(line).startswith(tuple(["nickname_commands", "module.nickname_commands", "sopel.module.nickname_commands"])):
|
||||
line = str(line).split("nickname_commands")[-1]
|
||||
line = "nickname_commands" + line
|
||||
@ -326,6 +330,13 @@ class BotCommands():
|
||||
except Exception as e:
|
||||
validcoms = e
|
||||
validcoms = []
|
||||
elif str(detected_line).startswith("action_commands"):
|
||||
comtype = "action"
|
||||
try:
|
||||
validcoms = eval(str(detected_line).split("action_commands")[-1])
|
||||
except Exception as e:
|
||||
validcoms = e
|
||||
validcoms = []
|
||||
elif str(detected_line).startswith("nickname_commands"):
|
||||
comtype = "nickname"
|
||||
try:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user