1.5.1 • Published 3 years ago

discord.js-qotd v1.5.1

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

discord.js-qotd

npm npm NPM

discord.js-qotd is a Node.js module that allows you to create polls or questions of the day with your discord bot. You can customize the arg separator, emoji and the embed color!

Note: Currently the FLAGS.GUILD_MESSAGES intent is required.

This will be updated shortly by using slash commands. If you wish to contribute to this update, open a pull request.

What's next:

  • Slash command support instead of traditional message command.
  • Buttons instead of reactions
  • Variable message content to go along with the qotd embed.

Installation

npm i discord.js-qotd

Parameter types

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

Documentation

Discord.Message

Discord.ColorResolvable

Usage example

Code

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

module.exports = {
	name: 'qotd',
	description: 'Create a qeustion of the day embed.',
	usage: 'Title + Option 1 + Option 2 + Option 3 + etc',
	execute(client, message, args) {
		poll(message, args, '+', '#00D1CD', "🤷‍♂️");
	},
};

On discord

!qotd Is this a poll?

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

image

!poll message + args1 + args2 + args3

This will return an embed message with 'message' as title and 'args1', 'args2' and 'args3' as fields, with corresponding reactions (🇦 => 🇨).

(If '+' is chosed as separator and '🤷‍♂️' as the emoji)

image

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

1.5.1

3 years ago

2.0.0

3 years ago

2.0.0-rc1

3 years ago

1.5.0

3 years ago

1.0.0-rc.6

3 years ago

1.0.0-rc.5

3 years ago

1.0.0-rc.4

3 years ago

1.0.0-rc.3

3 years ago

1.0.0-rc.2

3 years ago

1.0.0-rc.1

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.3

3 years ago

1.2.1

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago