call vote controller in messageReactionAdd
This commit is contained in:
parent
ba4aefed8e
commit
2c8cd96ac7
@ -22,13 +22,8 @@ export async function execute(messageReaction: MessageReaction, user: User) {
|
||||
}
|
||||
|
||||
logger.info(`Got reaction on message`, { requestId, guildId })
|
||||
//logger.debug(`reactedUponMessage payload: ${JSON.stringify(reactedUponMessage)}`)
|
||||
|
||||
logger.info(`emoji: ${messageReaction.emoji.toString()}`)
|
||||
if (messageReaction.emoji.toString() === Emoji.ticket) {
|
||||
logger.info(`User: ${user.id}, ${user.username} has added a ticket reaction. Starting role management`, { requestId, guildId })
|
||||
return
|
||||
}
|
||||
|
||||
if (!Object.values(ValidVoteEmotes).includes(messageReaction.emoji.toString()) && messageReaction.emoji.toString() !== NONE_OF_THAT) {
|
||||
logger.info(`${messageReaction.emoji.toString()} currently not handled`)
|
||||
@ -43,7 +38,8 @@ export async function execute(messageReaction: MessageReaction, user: User) {
|
||||
}
|
||||
else if (isInitialAnnouncement(reactedUponMessage)) {
|
||||
if (messageReaction.emoji.toString() === Emoji.ticket) {
|
||||
logger.error(`Got a role emoji. Not implemented yet. ${reactedUponMessage.id}`)
|
||||
logger.error(`Got a role emoji. ${reactedUponMessage.id}`)
|
||||
return client.roleController.addMediaRoleToUser(user, guildId, requestId)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user