Skip to content

Commit 46e87ea

Browse files
don't check text/plain
1 parent e5bca50 commit 46e87ea

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

bot/exts/utils/attachment_pastebin_uploader.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,11 @@ async def on_message(self, message: discord.Message) -> None:
8282
return
8383

8484
# Check if the message contains any text-based attachments.
85-
# Note that Discord does not always provide a content type
86-
# its not good enough to check the content type is text/plain,
87-
# we still need to check the charset
85+
# we only require a charset here, as its setting is matched
8886
attachments: list[discord.Attachment] = []
8987
for attachment in message.attachments:
9088
if (
9189
attachment.content_type
92-
and attachment.content_type.startswith("text/plain")
9390
and "charset" in attachment.content_type
9491
):
9592
attachments.append(attachment)

0 commit comments

Comments
 (0)