19.19.22 • Published 4 years ago

kqrma-music-api v19.19.22

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

discord.js-poll

npm NPM

npm

Note: this module uses recent discord.js features and requires discord.js version 12 and Node.js 14.

discord.js-poll is a Node.js module that allows you to create polls with your discord bot. You can customize the separator (between the title and the options) and the color of the embed.

Installation

npm i discord.js-poll

Parameters type

poll(message: Discord.Message, args: string[], separator: string, embedColor: Discord.ColorResolvable)

Documentation

Discord.Message

Discord.ColorResolvable

Usage example

Code

const Discord = require('discord.js');
const { poll } = require('discord.js-poll');

module.exports = {
	name: 'poll',
	description: 'Create a poll',
	usage: 'Title + Option 1 + Option 2 + Option 3 + etc',
	execute(client, message, args) {
		poll(message, args, '+', '#00D1CD');
	},
};

On discord

!poll Is this a poll ?

This will return an embed message with 'Is this a poll ?' as title and with 👍 and 👎 reactions.

Simple Poll Image

!poll What is your favorite food ? + Pasta + Burgers + Pizza

This will return an embed message with 'What is your favorite food ?' as title and 'Pasta', 'Burger' and 'Pizza' as fields, with corresponding reactions (🇦 => 🇨).

(If '+' is chosed as separator)

Poll Image

⚠️ You cannot add more than 26 options to the poll.

12.12.12

4 years ago

19.19.21

4 years ago

19.19.20

4 years ago

1.0.4

4 years ago

19.19.22

4 years ago

19.19.19

4 years ago

14.1.7

4 years ago

14.1.6

4 years ago

14.1.5

4 years ago

14.1.4

4 years ago

14.1.3

4 years ago

14.1.2

4 years ago

14.1.1

4 years ago

14.1.0

4 years ago