From 37ee5aa34cdfb31fc5ede34f6b5d96602f85172f Mon Sep 17 00:00:00 2001 From: Carl Vitullo Date: Fri, 25 Jul 2025 16:39:53 -0400 Subject: [PATCH] Use Discord timestamp features for timeout logs --- src/features/mod-activity.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/mod-activity.ts b/src/features/mod-activity.ts index 1912be13..7617e801 100644 --- a/src/features/mod-activity.ts +++ b/src/features/mod-activity.ts @@ -17,10 +17,11 @@ const guildMemberTimeoutHandler = ( if (!oldTimeout && newTimeout) { if (newTimeout >= date) { + const unixTime = Math.floor(newTimeout.getTime() / 1000); // makes sure we don't log timeouts from the past if a user's role updates. It's still possible that a user is updated during a timeout, but this is the best we can do. logger.log( "TIMEOUT", - `${newMember.user.tag} has been timed out in ${newMember.guild.name} until ${newTimeout}.`, + `${newMember.user.tag} has been timed out in ${newMember.guild.name} until ().`, "modLog", ); }