aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMusicOnline <[email protected]>2018-09-16 23:27:42 +0800
committerRapptz <[email protected]>2018-09-20 23:43:07 -0400
commit9af0e54cd377965053c8bd77857eac4c27b30d70 (patch)
treeb98896a4048ac9c687f4a4d5e62a562322d4ba99
parentAdd colour attribute for BaseUser (diff)
downloaddiscord.py-9af0e54cd377965053c8bd77857eac4c27b30d70.tar.xz
discord.py-9af0e54cd377965053c8bd77857eac4c27b30d70.zip
Correct ClientException message raised in invocation hooks.
For when the hooks are not coroutines.
-rw-r--r--discord/ext/commands/bot.py4
-rw-r--r--discord/ext/commands/core.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index b90f5dce..15999455 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -387,7 +387,7 @@ class BotBase(GroupMixin):
The coroutine is not actually a coroutine.
"""
if not asyncio.iscoroutinefunction(coro):
- raise discord.ClientException('The error handler must be a coroutine.')
+ raise discord.ClientException('The pre-invoke hook must be a coroutine.')
self._before_invoke = coro
return coro
@@ -420,7 +420,7 @@ class BotBase(GroupMixin):
The coroutine is not actually a coroutine.
"""
if not asyncio.iscoroutinefunction(coro):
- raise discord.ClientException('The error handler must be a coroutine.')
+ raise discord.ClientException('The post-invoke hook must be a coroutine.')
self._after_invoke = coro
return coro
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 5ea2700d..930b1a07 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -612,7 +612,7 @@ class Command:
The coroutine is not actually a coroutine.
"""
if not asyncio.iscoroutinefunction(coro):
- raise discord.ClientException('The error handler must be a coroutine.')
+ raise discord.ClientException('The pre-invoke hook must be a coroutine.')
self._before_invoke = coro
return coro
@@ -639,7 +639,7 @@ class Command:
The coroutine is not actually a coroutine.
"""
if not asyncio.iscoroutinefunction(coro):
- raise discord.ClientException('The error handler must be a coroutine.')
+ raise discord.ClientException('The post-invoke hook must be a coroutine.')
self._after_invoke = coro
return coro