From bb09cb5e520d7662ca7b19e0aad334160a532a9e Mon Sep 17 00:00:00 2001 From: ToxicKidz <78174417+ToxicKidz@users.noreply.github.com> Date: Thu, 29 Apr 2021 13:50:31 -0400 Subject: feat: Use embed timestamp in modpings off --- bot/exts/moderation/modpings.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bot/exts/moderation/modpings.py b/bot/exts/moderation/modpings.py index 2f180e594..274952d8a 100644 --- a/bot/exts/moderation/modpings.py +++ b/bot/exts/moderation/modpings.py @@ -3,11 +3,11 @@ import logging from async_rediscache import RedisCache from dateutil.parser import isoparse -from discord import Member +from discord import Embed, Member from discord.ext.commands import Cog, Context, group, has_any_role from bot.bot import Bot -from bot.constants import Emojis, Guild, MODERATION_ROLES, Roles +from bot.constants import Colours, Emojis, Guild, Icons, MODERATION_ROLES, Roles from bot.converters import Expiry from bot.utils.scheduling import Scheduler @@ -104,7 +104,9 @@ class ModPings(Cog): self._role_scheduler.cancel(mod.id) self._role_scheduler.schedule_at(duration, mod.id, self.reapply_role(mod)) - await ctx.send(f"{Emojis.check_mark} Moderators role has been removed until {until_date}.") + embed = Embed(timestamp=duration, colour=Colours.bright_green) + embed.set_footer(text="Moderators role has been removed", icon_url=Icons.green_checkmark) + await ctx.send(embed=embed) @modpings_group.command(name='on') @has_any_role(*MODERATION_ROLES) -- cgit v1.2.3 From 5c1cf2b5fd94359d42d147ce8687dd27b05e193d Mon Sep 17 00:00:00 2001 From: ToxicKidz <78174417+ToxicKidz@users.noreply.github.com> Date: Fri, 30 Apr 2021 22:02:07 -0400 Subject: chore: Add the missing 'until' --- bot/exts/moderation/modpings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/moderation/modpings.py b/bot/exts/moderation/modpings.py index 274952d8a..1ad5005de 100644 --- a/bot/exts/moderation/modpings.py +++ b/bot/exts/moderation/modpings.py @@ -105,7 +105,7 @@ class ModPings(Cog): self._role_scheduler.schedule_at(duration, mod.id, self.reapply_role(mod)) embed = Embed(timestamp=duration, colour=Colours.bright_green) - embed.set_footer(text="Moderators role has been removed", icon_url=Icons.green_checkmark) + embed.set_footer(text="Moderators role has been removed until", icon_url=Icons.green_checkmark) await ctx.send(embed=embed) @modpings_group.command(name='on') -- cgit v1.2.3