Clarify failed check message a bit (#13)
* Update Robocop.py * Update Robocop.py
This commit is contained in:
parent
0a045c9f61
commit
4127ee9e59
1 changed files with 2 additions and 1 deletions
|
@ -154,7 +154,8 @@ async def on_command_error(ctx, error):
|
||||||
elif isinstance(error, commands.CheckFailure):
|
elif isinstance(error, commands.CheckFailure):
|
||||||
return await ctx.send(f"{ctx.author.mention}: Check failed. "
|
return await ctx.send(f"{ctx.author.mention}: Check failed. "
|
||||||
"You might not have the right permissions "
|
"You might not have the right permissions "
|
||||||
"to run this command.")
|
"to run this command, or you may not be able "
|
||||||
|
"to run this command in the current channel.")
|
||||||
elif isinstance(error, commands.CommandInvokeError) and\
|
elif isinstance(error, commands.CommandInvokeError) and\
|
||||||
("Cannot send messages to this user" in error_text):
|
("Cannot send messages to this user" in error_text):
|
||||||
return await ctx.send(f"{ctx.author.mention}: I can't DM you.\n"
|
return await ctx.send(f"{ctx.author.mention}: I can't DM you.\n"
|
||||||
|
|
Loading…
Reference in a new issue