aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/commands/bot.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-01-13 20:08:55 -0500
committerRapptz <[email protected]>2016-01-13 20:08:55 -0500
commit4edff12f6bd711e546d5cdc29663cece8c2ba4a9 (patch)
tree290473c34855a2cfbf7f528a201a3f3b55d6a9f5 /discord/ext/commands/bot.py
parentGuild member add will include deaf and mute now, do not provide default values (diff)
downloaddiscord.py-4edff12f6bd711e546d5cdc29663cece8c2ba4a9.tar.xz
discord.py-4edff12f6bd711e546d5cdc29663cece8c2ba4a9.zip
Proper exception chaining.
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