big refactoring of none_of_that handler

extracting, better typing, reduction of complexity
This commit is contained in:
2023-07-17 23:30:48 +02:00
parent c022cc32d5
commit dc66c277b2
2 changed files with 54 additions and 40 deletions

View File

@ -34,7 +34,7 @@ export async function execute(messageReaction: MessageReaction, user: User) {
if (isVoteMessage(reactedUponMessage)) {
if (messageReaction.emoji.toString() === NONE_OF_THAT) {
logger.info(`Reaction is NONE_OF_THAT on a vote message. Handling`, { requestId, guildId })
return client.voteController.handleNoneOfThatVote(messageReaction, user, reactedUponMessage, requestId, guildId)
return client.voteController.handleNoneOfThatVote(messageReaction, reactedUponMessage, requestId, guildId)
}
if (messageReaction.emoji.toString() === Emoji.one) {
// do something