Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/features/mod-activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <t:${unixTime}:f> (<t:${unixTime}:R>).`,
"modLog",
);
}
Expand Down