From ea46a00bf79b6d85d544253d8f7234094722eb94 Mon Sep 17 00:00:00 2001 From: Lea Date: Sat, 24 Jun 2023 10:35:01 +0200 Subject: [PATCH] if only revolt was up so i could have tested --- bot/src/modules/server_logs.ts | 22 +++++++++++++++++++--- bot/src/modules/timedActions.ts | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/bot/src/modules/server_logs.ts b/bot/src/modules/server_logs.ts index 004f3f8..c018c18 100644 --- a/bot/src/modules/server_logs.ts +++ b/bot/src/modules/server_logs.ts @@ -180,15 +180,15 @@ async function createLogMessage( case ModActionType.RemoveInfraction: case ModActionType.TempBanExpire: { description = - "### " + + "#### " + (await tServer( `server_logs.${log.type}.content`, config, user || undefined, { username: user - ? `${user.username}#${user.discriminator}` - : "*Unknown*", + ? user.displayName + : infraction.user, }, )) + "\n" + @@ -203,6 +203,14 @@ async function createLogMessage( item: "id", id: infraction._id, }, + { + key: "target_user", + item: "id", + id: infraction.user, + user: user + ? `${user.username}#${user.discriminator}` + : "*Unknown*", + }, { key: "moderator", item: "id", @@ -218,6 +226,14 @@ async function createLogMessage( item: "id", id: infraction._id, }, + { + key: "target_user", + item: "id", + id: infraction.user, + username: user + ? `${user.username}#${user.discriminator}` + : "*Unknown*", + }, ], )); break; diff --git a/bot/src/modules/timedActions.ts b/bot/src/modules/timedActions.ts index 36da1fb..8175f8d 100644 --- a/bot/src/modules/timedActions.ts +++ b/bot/src/modules/timedActions.ts @@ -157,7 +157,7 @@ async function executeEvent(task: DBTimedAction) { server: infraction.server, type: ModActionType.TempBanExpire, user: infraction.user, - infraction: "", + infraction: task.infraction, }, client, null,