diff --git a/sopel_modules/SpiceBot/Commands.py b/sopel_modules/SpiceBot/Commands.py index d851b87..9d59d72 100644 --- a/sopel_modules/SpiceBot/Commands.py +++ b/sopel_modules/SpiceBot/Commands.py @@ -49,15 +49,10 @@ class BotCommands(): return False def get_realcom(self, command, trigger_command_type): - commands_list = dict() - for commandstype in self.dict['commands'][trigger_command_type].keys(): - for com in self.dict['commands'][commandstype].keys(): - if com not in commands_list.keys(): - commands_list[com] = self.dict['commands'][commandstype][com] - realcom = command - if command in commands_list.keys(): - if "aliasfor" in commands_list[command['com']].keys(): - realcom = commands_list[command['com']]["aliasfor"] + commands_list = list(self.dict['commands'][trigger_command_type].keys()) + if command in commands_list: + if "aliasfor" in self.dict['commands'][trigger_command_type][command].keys(): + realcom = self.dict['commands'][trigger_command_type][command] return realcom def set_command_disabled(self, bot, command, channel, timestamp, reason, bywhom):