fix newRequestId function
Compile the repository / compile (pull_request) Successful in 1m15s Details
Run unit tests / test (pull_request) Successful in 1m29s Details

This commit is contained in:
kenobi 2023-06-27 20:19:42 +02:00
parent ee742018e9
commit 98d1ca73b5
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ export const name = 'messageReactionAdd'
export async function execute(messageReaction: MessageReaction, user: User) { export async function execute(messageReaction: MessageReaction, user: User) {
if (user.id == client.user?.id) if (user.id == client.user?.id)
logger.info('Skipping bot reaction') logger.info('Skipping bot reaction')
const requestId = newRequestId const requestId = newRequestId()
const guildId = messageReaction.message.inGuild() ? messageReaction.message.guildId : noGuildId const guildId = messageReaction.message.inGuild() ? messageReaction.message.guildId : noGuildId
const reactedUponMessage: Message = messageReaction.message.partial ? await messageReaction.message.fetch() : messageReaction.message const reactedUponMessage: Message = messageReaction.message.partial ? await messageReaction.message.fetch() : messageReaction.message
if (!messageReaction.message.guild) { if (!messageReaction.message.guild) {

View File

@ -1,7 +1,7 @@
import { createLogger, format, transports } from "winston" import { createLogger, format, transports } from "winston"
import { config } from "./configuration" import { config } from "./configuration"
import { v4 } from "uuid" import { v4 } from "uuid"
export const newRequestId = v4() export function newRequestId() { return v4() }
export const noGuildId = 'NoGuildId' export const noGuildId = 'NoGuildId'