diff options
author | 2019-01-07 19:47:22 +0100 | |
---|---|---|
committer | 2019-01-07 19:47:22 +0100 | |
commit | fafa80ebcb29e4de5986a276ff85fb84e1d267be (patch) | |
tree | b0d6686aa89a30d16b99970660026aad36084ba2 | |
parent | Reverting modlog.py to original state (diff) |
Modifying 'send_log_message' so it supports sending additional embeds to the specified (log) channel
-rw-r--r-- | bot/cogs/modlog.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bot/cogs/modlog.py b/bot/cogs/modlog.py index 0561b5afb..c96838a54 100644 --- a/bot/cogs/modlog.py +++ b/bot/cogs/modlog.py @@ -106,7 +106,7 @@ class ModLog: async def send_log_message( self, icon_url: Optional[str], colour: Colour, title: Optional[str], text: str, thumbnail: str = None, channel_id: int = Channels.modlog, ping_everyone: bool = False, - files: List[File] = None, content: str = None + files: List[File] = None, content: str = None, additional_embeds: List[Embed] = None, ): embed = Embed(description=text) @@ -125,7 +125,14 @@ class ModLog: else: content = "@everyone" - await self.bot.get_channel(channel_id).send(content=content, embed=embed, files=files) + channel = self.bot.get_channel(channel_id) + + await channel.send(content=content, embed=embed, files=files) + + if additional_embeds: + await channel.send("With the following embed(s):") + for additional_embed in additional_embeds: + await channel.send(embed=additional_embed) async def on_guild_channel_create(self, channel: GUILD_CHANNEL): if channel.guild.id != GuildConstant.id: |