[V3 Help] Exception for help when bot is blocked (#1955)

Fix for #1901.
Administrative merge: Travis CI failed due to docs issue, see #1957
This commit is contained in:
aikaterna 2018-07-24 17:39:51 -07:00 committed by Kowlin
parent f8a36885fe
commit f24290c423

View File

@ -407,7 +407,7 @@ async def help(ctx, *cmds: str):
max_pages_in_guild = await ctx.bot.db.help.max_pages_in_guild()
if len(embeds) > max_pages_in_guild:
destination = ctx.author
try:
for embed in embeds:
if use_embeds:
try:
@ -421,6 +421,10 @@ async def help(ctx, *cmds: str):
except discord.HTTPException:
destination = ctx.author
await destination.send(embed)
except discord.Forbidden:
await ctx.channel.send(
"I couldn't send the help message to you in DM. Either you blocked me or you disabled DMs in this server."
)
@help.error