aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/bot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 34254d8e8..d25074fd9 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -262,7 +262,7 @@ class Bot(commands.Bot):
for subcommand in command.commands:
self._add_root_aliases(subcommand)
- for alias in command.root_aliases:
+ for alias in getattr(command, "root_aliases", ()):
if alias in self.all_commands:
raise commands.CommandRegistrationError(alias, alias_conflict=True)
@@ -274,5 +274,5 @@ class Bot(commands.Bot):
for subcommand in command.commands:
self._remove_root_aliases(subcommand)
- for alias in command.root_aliases:
+ for alias in getattr(command, "root_aliases", ()):
self.all_commands.pop(alias, None)