From 98d1ca73b5ae0eb5f8682922dad481749cdae467 Mon Sep 17 00:00:00 2001 From: kenobi Date: Tue, 27 Jun 2023 20:19:42 +0200 Subject: [PATCH] fix newRequestId function --- server/events/handleMessageReactionAdd.ts | 2 +- server/logger.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/events/handleMessageReactionAdd.ts b/server/events/handleMessageReactionAdd.ts index e137c17..1820b93 100644 --- a/server/events/handleMessageReactionAdd.ts +++ b/server/events/handleMessageReactionAdd.ts @@ -10,7 +10,7 @@ export const name = 'messageReactionAdd' export async function execute(messageReaction: MessageReaction, user: User) { if (user.id == client.user?.id) logger.info('Skipping bot reaction') - const requestId = newRequestId + const requestId = newRequestId() const guildId = messageReaction.message.inGuild() ? messageReaction.message.guildId : noGuildId const reactedUponMessage: Message = messageReaction.message.partial ? await messageReaction.message.fetch() : messageReaction.message if (!messageReaction.message.guild) { diff --git a/server/logger.ts b/server/logger.ts index 335439d..060c72a 100644 --- a/server/logger.ts +++ b/server/logger.ts @@ -1,7 +1,7 @@ import { createLogger, format, transports } from "winston" import { config } from "./configuration" import { v4 } from "uuid" -export const newRequestId = v4() +export function newRequestId() { return v4() } export const noGuildId = 'NoGuildId'