Skip to content

Commit

Permalink
Error when fail to send message
Browse files Browse the repository at this point in the history
  • Loading branch information
r-hensley committed May 13, 2024
1 parent 92d792f commit dc10a71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cogs/questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ async def add_question(self, ctx: commands.Context, target_message: discord.Mess
pass
return

log_message = await utils.safe_send(log_channel, embed=emb)
try:
log_message = await utils.safe_send(log_channel, embed=emb)
except discord.Forbidden:
await utils.safe_send(ctx, "I lack the ability to send messages in the log channel.")
return

try:
await self._delete_log(ctx)
Expand Down

0 comments on commit dc10a71

Please sign in to comment.