0.1.8 • Published 3 years ago
discord.js-poll-tool v0.1.8
discord.js-poll-tool
To-do
- Control features(stop, add/remove time, add/remove responses and other)
- Sharding support
- Extend event features
- Improve README.md
- Fix all bugs
Installation
npm i discord.js-poll-tool
Example
Launch of the module
const { PollManager } = require("discord.js-poll-tool")
client.poll = new PollManager(client, {
storage: "./Poll.js",
updateEvery: 5000 //in ms
})
view all the options in the documentation
Start a poll
const ms = require("ms")
client.on("messageCreate", (message) => {
if(message.content == '!start-poll') {
client.poll.startPoll(message.channel, {
duration: ms("20s"),
name: "Do you love me ?"
answers: [
{name: "Yes", emoji: "✅"},
{name: "No", emoji: "❌"}
],
})
}
})
view all the options in the documentation