test
This commit is contained in:
parent
fa3ab92736
commit
eac398b21b
@ -21,11 +21,25 @@ class Commands():
|
||||
|
||||
@property
|
||||
def sopel_nickname_commands(self):
|
||||
return self.bot.rules.get_all_nick_commands()
|
||||
commands_list = []
|
||||
for plugin_name, commands in self.bot.rules.get_all_nick_commands():
|
||||
for command in commands.values():
|
||||
commands_list.append({
|
||||
"name": command.name,
|
||||
"aliases": command.aliases,
|
||||
})
|
||||
return commands_list
|
||||
|
||||
@property
|
||||
def sopel_action_commands(self):
|
||||
return self.bot.rules.get_all_action_commands()
|
||||
commands_list = []
|
||||
for plugin_name, commands in self.bot.rules.get_all_action_commands():
|
||||
for command in commands.values():
|
||||
commands_list.append({
|
||||
"name": command.name,
|
||||
"aliases": command.aliases,
|
||||
})
|
||||
return commands_list
|
||||
|
||||
def dispatch(self, bot, trigger, trigger_dict):
|
||||
if trigger_dict["trigger_type"] == "command":
|
||||
|
||||
@ -56,10 +56,7 @@ def sopel_commands(bot, trigger):
|
||||
|
||||
bot.say("testing commands")
|
||||
|
||||
for x in sb.commands.sopel_commands:
|
||||
bot.say(str(x))
|
||||
for y in x:
|
||||
bot.say(str(y))
|
||||
sb.osd(sb.commands.sopel_commands, trigger.sender)
|
||||
|
||||
|
||||
@prerun()
|
||||
@ -67,10 +64,7 @@ def sopel_commands(bot, trigger):
|
||||
def sopel_nickname_commands(bot, trigger):
|
||||
bot.say("testing nickname_commands")
|
||||
|
||||
for x in sb.commands.sopel_nickname_commands:
|
||||
bot.say(str(x))
|
||||
for y in x:
|
||||
bot.say(str(y))
|
||||
sb.osd(sb.commands.sopel_nickname_commands, trigger.sender)
|
||||
|
||||
|
||||
@prerun()
|
||||
@ -79,7 +73,4 @@ def sopel_action_commands(bot, trigger):
|
||||
|
||||
bot.say("testing action_commands")
|
||||
|
||||
for x in sb.commands.sopel_action_commands:
|
||||
bot.say(str(x))
|
||||
for y in x:
|
||||
bot.say(str(y))
|
||||
sb.osd(sb.commands.sopel_action_commands, trigger.sender)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user