mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 19:58:54 -05:00
[Help] Prevent spamming when a user blocks the bot (#2790)
Currently the bot sends an error message for each page of help, this should make it only send once.
This commit is contained in:
parent
e854716236
commit
3c66c602f6
@ -538,7 +538,7 @@ class RedHelpFormatter:
|
|||||||
try:
|
try:
|
||||||
await destination.send(embed=page)
|
await destination.send(embed=page)
|
||||||
except discord.Forbidden:
|
except discord.Forbidden:
|
||||||
await ctx.send(
|
return await ctx.send(
|
||||||
T_(
|
T_(
|
||||||
"I couldn't send the help message to you in DM. "
|
"I couldn't send the help message to you in DM. "
|
||||||
"Either you blocked me or you disabled DMs in this server."
|
"Either you blocked me or you disabled DMs in this server."
|
||||||
@ -549,7 +549,7 @@ class RedHelpFormatter:
|
|||||||
try:
|
try:
|
||||||
await destination.send(page)
|
await destination.send(page)
|
||||||
except discord.Forbidden:
|
except discord.Forbidden:
|
||||||
await ctx.send(
|
return await ctx.send(
|
||||||
T_(
|
T_(
|
||||||
"I couldn't send the help message to you in DM. "
|
"I couldn't send the help message to you in DM. "
|
||||||
"Either you blocked me or you disabled DMs in this server."
|
"Either you blocked me or you disabled DMs in this server."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user