Skip to content

Commit 0e4cd5c

Browse files
authored
Include message snapshots in on_message filters (#3555)
1 parent 7d9d456 commit 0e4cd5c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎bot/exts/filtering/filtering.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ async def on_message(self, msg: Message) -> None:
261261
for a in msg.attachments if a.content_type and "charset" in a.content_type
262262
]
263263

264+
text_contents.extend(
265+
[snapshot.content for snapshot in msg.message_snapshots]
266+
)
267+
264268
if text_contents:
265269
attachment_content = "\n\n".join(text_contents)
266270
ctx = ctx.replace(content=f"{ctx.content}\n\n{attachment_content}")

0 commit comments

Comments
 (0)