fix: uh polls

This commit is contained in:
Saahil 2024-12-16 21:46:43 -05:00
parent 483b8ab936
commit fff129861d
No known key found for this signature in database
GPG key ID: 8A8B64515254CFC6

View file

@ -90,12 +90,12 @@ export default class ZeonPoll implements Command {
// Handle votes
app.action(/vote_poll_\d+_\d+/, async ({ action, ack, client, body }) => {
console.debug(0, action.value);
console.debug(0);
await ack();
const [pollId, optionIndex] = action.value.split("_").slice(1);
const userId = body.user.id;
console.log(pollId, action.value, userId, polls)
if (!polls[pollId]) return;
if (!polls[pollId].allowMultiple && polls[pollId].votes[userId]) {