feat/40-reroll-on-disinterest #54

Merged
kenobi merged 73 commits from feat/40-reroll-on-disinterest into master 2023-11-19 20:24:36 +01:00
Showing only changes of commit b8a32aab40 - Show all commits

View File

@ -0,0 +1,20 @@
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
}