Improve and add more usage of discord timestamps (#5241)

* Improve and add more usage of discord timestamps

* How did that whitespace get there?
This commit is contained in:
jack1142
2021-09-04 09:14:05 +02:00
committed by GitHub
parent 4366af6f6c
commit a0a433b13d
4 changed files with 5 additions and 5 deletions

View File

@@ -643,7 +643,7 @@ class KickBanMixin(MixinMeta):
with contextlib.suppress(discord.HTTPException):
# We don't want blocked DMs preventing us from banning
msg = _("You have been temporarily banned from {server_name} until {date}.").format(
server_name=guild.name, date=unban_time.strftime("%m-%d-%Y %H:%M:%S")
server_name=guild.name, date=f"<t:{int(unban_time.timestamp())}>"
)
if guild_data["dm_on_kickban"] and reason:
msg += _("\n\n**Reason:** {reason}").format(reason=reason)