diff --git a/modules/cloner.py b/modules/cloner.py index 973bd13..72e25a4 100644 --- a/modules/cloner.py +++ b/modules/cloner.py @@ -217,7 +217,7 @@ async def clone_categories(self, perms: bool = True) -> None: if perms: for role, permissions in category.overwrites.items(): if isinstance(role, discord.Role): - overwrites[self.mappings["roles"][role]] = permissions + overwrites[self.mappings["roles"][role.id]] = permissions new_category = await self.new_guild.create_category( name=category.name, position=category.position, overwrites=overwrites ) @@ -245,7 +245,7 @@ async def clone_channels(self, perms: bool = True) -> None: if perms: for role, permissions in channel.overwrites.items(): if isinstance(role, discord.Role): - overwrites[self.mappings["roles"][role]] = permissions + overwrites[self.mappings["roles"][role.id]] = permissions if self.debug and overwrites: self.logger.debug(f"Got overwrites mapping for channel #{channel.name}") if isinstance(channel, discord.TextChannel): @@ -319,7 +319,7 @@ async def add_community_channels(self, perms: bool = True) -> None: if perms and channel.overwrites: for role, permissions in channel.overwrites.items(): if isinstance(role, discord.Role): - overwrites[self.mappings["roles"][role]] = permissions + overwrites[self.mappings["roles"][role.id]] = permissions if isinstance(channel, discord.ForumChannel): tags: discord.abc.Sequence[discord.ForumTag] = ( channel.available_tags @@ -453,6 +453,8 @@ async def send_webhook(self, else "" ) + content = content.replace("\n", "") + self.logger.debug(f"Cloned message from {author.name}" + f": {content}" if content else "") except discord.errors.HTTPException: if self.debug: