mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user