aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2018-12-27 04:53:10 +1000
committerGravatar scragly <[email protected]>2018-12-27 04:53:10 +1000
commit6dd7d7d641403d468418eb8b8d1d60d35e5d8e0d (patch)
treeb02a9718979e55a9be6fd425ef2ca5bc9f09e6dd
parentAdd DM emoji indicator for infr notify success. (diff)
Add content kwarg to modlog messages.
-rw-r--r--bot/cogs/modlog.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bot/cogs/modlog.py b/bot/cogs/modlog.py
index 1d1546d5b..905f114c1 100644
--- a/bot/cogs/modlog.py
+++ b/bot/cogs/modlog.py
@@ -104,8 +104,9 @@ class ModLog:
self._ignored[event].append(item)
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
+ 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
):
embed = Embed(description=text)
@@ -118,10 +119,11 @@ class ModLog:
if thumbnail is not None:
embed.set_thumbnail(url=thumbnail)
- content = None
-
if ping_everyone:
- content = "@everyone"
+ if content:
+ content = f"@everyone\n{content}"
+ else:
+ content = "@everyone"
await self.bot.get_channel(channel_id).send(content=content, embed=embed, files=files)