diff --git a/changelog.d/3057.bugfix.rst b/changelog.d/3057.bugfix.rst new file mode 100644 index 000000000..da388eeac --- /dev/null +++ b/changelog.d/3057.bugfix.rst @@ -0,0 +1 @@ +Bot will now properly send a message when the invoked command is guild-only. \ No newline at end of file diff --git a/changelog.d/3057.enhance.rst b/changelog.d/3057.enhance.rst new file mode 100644 index 000000000..01748722e --- /dev/null +++ b/changelog.d/3057.enhance.rst @@ -0,0 +1 @@ +Bot will now send a message when the invoked command is DM-only. \ No newline at end of file diff --git a/redbot/core/events.py b/redbot/core/events.py index 77509dd83..9bd6699a2 100644 --- a/redbot/core/events.py +++ b/redbot/core/events.py @@ -234,10 +234,12 @@ def init_events(bot, cli_flags): elif isinstance(error, commands.UserFeedbackCheckFailure): if error.message: await ctx.send(error.message) - elif isinstance(error, commands.CheckFailure): - pass elif isinstance(error, commands.NoPrivateMessage): await ctx.send("That command is not available in DMs.") + elif isinstance(error, commands.PrivateMessageOnly): + await ctx.send("That command is only available in DMs.") + elif isinstance(error, commands.CheckFailure): + pass elif isinstance(error, commands.CommandOnCooldown): await ctx.send( "This command is on cooldown. Try again in {}.".format(