mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Core] Fix error message about guild-only command and add dm-only error message (#3057)
* enhance(core): fix guild-only error message, add dm-only error message * chore(changelog): add towncrier entries
This commit is contained in:
parent
428bf55480
commit
d42a2d5140
1
changelog.d/3057.bugfix.rst
Normal file
1
changelog.d/3057.bugfix.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Bot will now properly send a message when the invoked command is guild-only.
|
||||||
1
changelog.d/3057.enhance.rst
Normal file
1
changelog.d/3057.enhance.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Bot will now send a message when the invoked command is DM-only.
|
||||||
@ -234,10 +234,12 @@ def init_events(bot, cli_flags):
|
|||||||
elif isinstance(error, commands.UserFeedbackCheckFailure):
|
elif isinstance(error, commands.UserFeedbackCheckFailure):
|
||||||
if error.message:
|
if error.message:
|
||||||
await ctx.send(error.message)
|
await ctx.send(error.message)
|
||||||
elif isinstance(error, commands.CheckFailure):
|
|
||||||
pass
|
|
||||||
elif isinstance(error, commands.NoPrivateMessage):
|
elif isinstance(error, commands.NoPrivateMessage):
|
||||||
await ctx.send("That command is not available in DMs.")
|
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):
|
elif isinstance(error, commands.CommandOnCooldown):
|
||||||
await ctx.send(
|
await ctx.send(
|
||||||
"This command is on cooldown. Try again in {}.".format(
|
"This command is on cooldown. Try again in {}.".format(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user