Skip to content

Commit

Permalink
Don't log for "Not Found" webhooks where TIldy is the author
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrss committed Jul 9, 2024
1 parent 7c4837d commit 399b36b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion botto/tld_botto.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,10 @@ async def on_message(self, message: Message):
webhook = await self.fetch_webhook(webhook_id)
if webhook.type != discord.WebhookType.incoming:
return
except discord.NotFound | discord.Forbidden:
except discord.NotFound:
if message.author.id == self.user.id:
return
except discord.Forbidden:
pass
if message.author.id == self.user.id:
log.debug(f"Ignoring message {message.id} from self")
Expand Down

0 comments on commit 399b36b

Please sign in to comment.