From 9af0e54cd377965053c8bd77857eac4c27b30d70 Mon Sep 17 00:00:00 2001 From: MusicOnline <39178127+MusicOnline@users.noreply.github.com> Date: Sun, 16 Sep 2018 23:27:42 +0800 Subject: Correct ClientException message raised in invocation hooks. For when the hooks are not coroutines. --- discord/ext/commands/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'discord/ext/commands/bot.py') 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 -- cgit v1.2.3