Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bot/exts/utils/attachment_pastebin_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def on_message_delete(self, message: discord.Message) -> None:
async def on_message(self, message: discord.Message) -> None:
"""Listens for messages containing attachments and offers to upload them to the pastebin."""
# Check if the message contains an embedded file and is not sent by a bot.
if message.author.bot or not any("charset" in a.content_type for a in message.attachments):
if message.author.bot or not message.guild or not any("charset" in a.content_type for a in message.attachments):
return

log.trace(f"Offering to upload attachments for {message.author} in {message.channel}, message {message.id}")
Expand Down