ć š©šæ | š - KššŁ šš¼R ć
DIAdiscord.js - Imagine an app
ā¢Created by ć š©šæ | š - KššŁ šš¼R ć on 8/13/2024 in #djs-questions
Vote Button Update Logic
Hey,
I'm working on a bot that implements mafia game mechanics, and I'm facing a challenge with updating the dynamic count emojis on voting buttons during the mafia vote phase.
In the mafiaVote function, I dynamically create buttons for each non-mafia player, where the emoji on each button represents the current vote count. The logic works well for individual votes, but I'm struggling with updating the interaction for all mafia players after each mafia vote.
Currently when a mafia player votes for a certain player, the vote counter changes only for the player who voted, but does not change for the rest of the players, except when the other player's votes
The code:
5 replies