@@ -673,8 +673,8 @@ async def append_log(
673673 self ,
674674 message : Message ,
675675 * ,
676- message_id : str = "" ,
677- channel_id : str = "" ,
676+ message_id : str | int = "" ,
677+ channel_id : str | int = "" ,
678678 type_ : str = "thread_message" ,
679679 ) -> dict :
680680 channel_id = str (channel_id ) or str (message .channel .id )
@@ -697,13 +697,40 @@ async def append_log(
697697 "id" : a .id ,
698698 "filename" : a .filename ,
699699 # In previous versions this was true for both videos and images
700- "is_image" : a .content_type .startswith ("image/" ),
700+ "is_image" : a .content_type and a . content_type .startswith ("image/" ),
701701 "size" : a .size ,
702702 "url" : a .url ,
703703 "content_type" : a .content_type ,
704704 }
705705 for a in message .attachments
706706 ],
707+ "messageReference" : {
708+ "message_id" : message .reference .message_id ,
709+ "channel_id" : message .reference .channel_id ,
710+ "guild_id" : message .reference .guild_id ,
711+ "type" : message .reference .type .name ,
712+ } if message .reference else None ,
713+ "messageSnapshots" : [
714+ {
715+ "type" : m .type .name ,
716+ "content" : m .content ,
717+ "attachments" : [
718+ {
719+ "id" : a .id ,
720+ "filename" : a .filename ,
721+ # In previous versions this was true for both videos and images
722+ "is_image" : a .content_type and a .content_type .startswith ("image/" ),
723+ "size" : a .size ,
724+ "url" : a .url ,
725+ "content_type" : a .content_type ,
726+ }
727+ for a in m .attachments
728+ ],
729+ "timestamp" : m .created_at ,
730+ "editedTimestamp" : m .edited_at ,
731+ }
732+ for m in message .message_snapshots
733+ ],
707734 }
708735
709736 return await self .logs .find_one_and_update (
0 commit comments