aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/commands/bot.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/ext/commands/bot.py')
-rw-r--r--discord/ext/commands/bot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index 9507dbe2..24e1d4b9 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -456,8 +456,8 @@ class Bot(GroupMixin, discord.Client):
lib = importlib.import_module(name)
try:
lib.setup(self)
- except AttributeError:
- raise discord.ClientException('extension does not have a setup function')
+ except AttributeError as e:
+ raise discord.ClientException('extension does not have a setup function') from e
self.extensions[name] = lib