diff options
| author | 2018-12-30 22:59:29 +1000 | |
|---|---|---|
| committer | 2018-12-30 22:59:29 +1000 | |
| commit | 32438177b88f6adcb034f1a54a1a63d9b2b76095 (patch) | |
| tree | 6081eb3d5203b83fd3256be97427ca00af6f7313 | |
| parent | Merge branch 'master' into mod-dm-status (diff) | |
| parent | Merge pull request #233 from python-discord/warn-modlog (diff) | |
Merge branch 'master' into mod-dm-status
| -rw-r--r-- | bot/cogs/moderation.py | 26 | ||||
| -rw-r--r-- | bot/constants.py | 2 | ||||
| -rw-r--r-- | config-default.yml | 2 |
3 files changed, 30 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): diff --git a/bot/constants.py b/bot/constants.py index 5e7927ed9..99ef98da2 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -292,6 +292,8 @@ class Icons(metaclass=YAMLGetter): user_unmute: str user_verified: str + user_warn: str + pencil: str remind_blurple: str diff --git a/config-default.yml b/config-default.yml index e7145289d..3a1ad8052 100644 --- a/config-default.yml +++ b/config-default.yml @@ -72,6 +72,8 @@ style: user_unmute: "https://cdn.discordapp.com/emojis/472472639206719508.png" user_verified: "https://cdn.discordapp.com/emojis/470326274519334936.png" + user_warn: "https://cdn.discordapp.com/emojis/470326274238447633.png" + pencil: "https://cdn.discordapp.com/emojis/470326272401211415.png" remind_blurple: "https://cdn.discordapp.com/emojis/477907609215827968.png" |