Skip to content

Commit

Permalink
update poll.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SamPandey001 committed Nov 6, 2022
1 parent 7287f8e commit 718ade0
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions commands/Group/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@ let [poll,opt] = args.join(" ").split(";");
`${prefix}poll question;option1,option2,option3.....`
);
let options = [];
for (let i of opt.split(',')) {
options.push({ optionName: i });
}
await Void.relayMessage(
citel.chat,
{
pollCreationMessage: {
name: poll,
options,
selectableOptionsCount: 1,
},
},
{}
);
for (let i of opt.split(',')) {
options.push(i);
}
await Void.sendMessage(citel.chat, {
poll: {
name: poll,
values: options
}
})
}
}

0 comments on commit 718ade0

Please sign in to comment.