Compare commits

..

No commits in common. "b8a32aab409f1f9e0a8a940823997f24a54842e0" and "0d3c62c6ad34c38bf4eb95fd7c25bd703553c56c" have entirely different histories.

3 changed files with 0 additions and 29 deletions

View File

@ -1,20 +0,0 @@
import { Message, MessageReaction, User } from "discord.js";
import { messageIsVoteMessage } from "../helper/messageIdentifiers";
import { logger, newRequestId, noGuildId } from "../logger";
export const name = 'messageReactionAdd'
export async function execute(messageReaction: MessageReaction, user: User) {
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 (messageIsVoteMessage(reactedUponMessage)) {
logger.info(`Got reaction on message`, { requestId, guildId })
}
return
}

View File

@ -1,6 +0,0 @@
import { Message } from "discord.js";
export function messageIsVoteMessage(msg: Message): boolean {
return msg.content.includes('[Abstimmung]')
}

View File

@ -1,8 +1,5 @@
import { createLogger, format, transports } from "winston" import { createLogger, format, transports } from "winston"
import { config } from "./configuration" import { config } from "./configuration"
import { v4 } from "uuid"
export const newRequestId = v4()
export const noGuildId = 'NoGuildId'
const printFn = format.printf(({ guildId, level, message, errorCode, requestId, timestamp: logTimestamp }: { [k: string]: string }) => { const printFn = format.printf(({ guildId, level, message, errorCode, requestId, timestamp: logTimestamp }: { [k: string]: string }) => {