aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/moderation.py
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2018-12-30 22:59:29 +1000
committerGravatar GitHub <[email protected]>2018-12-30 22:59:29 +1000
commit32438177b88f6adcb034f1a54a1a63d9b2b76095 (patch)
tree6081eb3d5203b83fd3256be97427ca00af6f7313 /bot/cogs/moderation.py
parentMerge branch 'master' into mod-dm-status (diff)
parentMerge pull request #233 from python-discord/warn-modlog (diff)
Merge branch 'master' into mod-dm-status
Diffstat (limited to '')
-rw-r--r--bot/cogs/moderation.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/bot/cogs/moderation.py b/bot/cogs/moderation.py
index 24b60332f..ac08d3dd4 100644
--- a/bot/cogs/moderation.py
+++ b/bot/cogs/moderation.py
@@ -103,6 +103,19 @@ class Moderation(Scheduler):
if not notified:
await self.log_notify_failure(user, ctx.author, "warning")
+ # Send a message to the mod log
+ await self.mod_log.send_log_message(
+ icon_url=Icons.user_warn,
+ colour=Colour(Colours.soft_red),
+ title="Member warned",
+ thumbnail=user.avatar_url_as(static_format="png"),
+ text=textwrap.dedent(f"""
+ Member: {user.mention} (`{user.id}`)
+ Actor: {ctx.message.author}
+ Reason: {reason}
+ """)
+ )
+
@with_role(*MODERATION_ROLES)
@command(name="kick")
async def kick(self, ctx: Context, user: Member, *, reason: str = None):
@@ -385,6 +398,19 @@ class Moderation(Scheduler):
await ctx.send(result_message)
+ # Send a message to the mod log
+ await self.mod_log.send_log_message(
+ icon_url=Icons.user_warn,
+ colour=Colour(Colours.soft_red),
+ title="Member shadow warned",
+ thumbnail=user.avatar_url_as(static_format="png"),
+ text=textwrap.dedent(f"""
+ Member: {user.mention} (`{user.id}`)
+ Actor: {ctx.message.author}
+ Reason: {reason}
+ """)
+ )
+
@with_role(*MODERATION_ROLES)
@command(name="shadow_kick", hidden=True, aliases=['shadowkick', 'skick'])
async def shadow_kick(self, ctx: Context, user: Member, *, reason: str = None):