remove duplicate check for none_of_that vote
This commit is contained in:
parent
98d1ca73b5
commit
3f071c8a4e
@ -10,9 +10,7 @@ export default class VoteController {
|
|||||||
|
|
||||||
public async handleNoneOfThatVote(messageReaction: MessageReaction, user: User, reactedUponMessage: Message, requestId: string, guildId: string) {
|
public async handleNoneOfThatVote(messageReaction: MessageReaction, user: User, reactedUponMessage: Message, requestId: string, guildId: string) {
|
||||||
if (!messageReaction.message.guild) return 'No guild'
|
if (!messageReaction.message.guild) return 'No guild'
|
||||||
if (messageIsVoteMessage(reactedUponMessage)) {
|
|
||||||
logger.debug(`${reactedUponMessage.id} is vote message`, { requestId, guildId })
|
logger.debug(`${reactedUponMessage.id} is vote message`, { requestId, guildId })
|
||||||
if (messageReaction.message.reactions.cache.find(reaction => reaction.emoji.toString() == NONE_OF_THAT)) {
|
|
||||||
const watcherRoleMember = await getMembersWithRoleFromGuild(config.bot.announcement_role, messageReaction.message.guild)
|
const watcherRoleMember = await getMembersWithRoleFromGuild(config.bot.announcement_role, messageReaction.message.guild)
|
||||||
logger.info("ROLE MEMBERS " + JSON.stringify(watcherRoleMember), { requestId, guildId })
|
logger.info("ROLE MEMBERS " + JSON.stringify(watcherRoleMember), { requestId, guildId })
|
||||||
const watcherRoleMemberCount = watcherRoleMember.size
|
const watcherRoleMemberCount = watcherRoleMember.size
|
||||||
@ -27,7 +25,4 @@ export default class VoteController {
|
|||||||
}
|
}
|
||||||
logger.info(`No reroll`, { requestId, guildId })
|
logger.info(`No reroll`, { requestId, guildId })
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user