diff --git a/.gitignore b/.gitignore index 53f7f59..4fabffc 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ test_release/ DiscoReaper-* REAPER-*/ +ReaperFiles-*/ Reaper-*/ DISCORD-*/ FLUXER-*/ diff --git a/src/fluxer/migrate_message.py b/src/fluxer/migrate_message.py index b765c64..4c1529e 100644 --- a/src/fluxer/migrate_message.py +++ b/src/fluxer/migrate_message.py @@ -231,7 +231,8 @@ async def migrate_messages( timestamp=msg.created_at.strftime("%Y-%m-%d %H:%M:%S"), files=files if files else None, reply_to_message_id=reply_to_fluxer_id, - is_forwarded=is_forwarded + is_forwarded=is_forwarded, + embeds=msg.embeds ) if fluxer_msg_id: diff --git a/src/fluxer/writer.py b/src/fluxer/writer.py index 3a8cc4c..25507f7 100644 --- a/src/fluxer/writer.py +++ b/src/fluxer/writer.py @@ -224,7 +224,7 @@ class FluxerWriter: assert self.client is not None return await self.client.get_guild_channels(self.community_id) - async def send_message(self, channel_id: str, author_name: str, content: str, timestamp: str, author_avatar_url: Optional[str] = None, files: Optional[List[Dict[str, Any]]] = None, reply_to_message_id: Optional[str] = None, is_forwarded: bool = False) -> Optional[str]: + async def send_message(self, channel_id: str, author_name: str, content: str, timestamp: str, author_avatar_url: Optional[str] = None, files: Optional[List[Dict[str, Any]]] = None, reply_to_message_id: Optional[str] = None, is_forwarded: bool = False, embeds: Optional[List[Dict[str, Any]]] = None) -> Optional[str]: """ Sends a message to the target channel. Uses a webhook to mimic the original author if possible. @@ -268,6 +268,7 @@ class FluxerWriter: username=f"{author_name} (discord)", avatar_url=author_avatar_url, files=fluxer_files, + embeds=embeds, wait=True ) return str(msg.id) if msg else None @@ -289,6 +290,7 @@ class FluxerWriter: channel_id=channel_id, content=final_bot_content, files=fluxer_files, + embeds=embeds, message_reference=message_reference ) return str(msg_data["id"]) if msg_data else None diff --git a/src/stoat/migrate_message.py b/src/stoat/migrate_message.py index 746e110..cad277e 100644 --- a/src/stoat/migrate_message.py +++ b/src/stoat/migrate_message.py @@ -234,7 +234,8 @@ async def migrate_messages( timestamp=msg.created_at.strftime("%Y-%m-%d %H:%M:%S"), files=files if files else None, reply_to_message_id=reply_to_stoat_id, - is_forwarded=is_forwarded + is_forwarded=is_forwarded, + embeds=msg.embeds ) if stoat_msg_id: diff --git a/src/stoat/writer.py b/src/stoat/writer.py index b2013d0..f34e85f 100644 --- a/src/stoat/writer.py +++ b/src/stoat/writer.py @@ -217,7 +217,8 @@ class StoatWriter: async def send_message(self, channel_id: str, author_name: str, content: str, timestamp: str, author_avatar_url: Optional[str] = None, files: Optional[List[Dict[str, Any]]] = None, - reply_to_message_id: Optional[str] = None, is_forwarded: bool = False) -> Optional[str]: + reply_to_message_id: Optional[str] = None, is_forwarded: bool = False, + embeds: Optional[List[Dict[str, Any]]] = None) -> Optional[str]: """ Sends a message to the target channel using Stoat's masquerade feature. Raises on permission errors — caller must handle. @@ -259,7 +260,8 @@ class StoatWriter: content=final_content, masquerade=masquerade, replies=replies, - attachments=attachments + attachments=attachments, + embeds=embeds ) return str(msg.id) if msg else None except Exception as e: