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'