aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-05-01 14:53:33 +0200
committerGravatar GitHub <[email protected]>2021-05-01 14:53:33 +0200
commite94b6df3fe9e60ffe66a292a233c01c76ec4859c (patch)
tree59eaa2f5f3c882cd62cfc026053222e5e10c448c
parentMerge pull request #1555 from python-discord/bug/info/1553/snippet-404 (diff)
parentMerge branch 'main' into mod-ping-off-embed-timestamp (diff)
Merge pull request #1556 from ToxicKidz/mod-ping-off-embed-timestamp
feat: Use embed timestamp in modpings off
-rw-r--r--bot/exts/moderation/modpings.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bot/exts/moderation/modpings.py b/bot/exts/moderation/modpings.py
index 2f180e594..1ad5005de 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 until", icon_url=Icons.green_checkmark)
+ await ctx.send(embed=embed)
@modpings_group.command(name='on')
@has_any_role(*MODERATION_ROLES)