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.
- Slash command support instead of traditional message command.
- Buttons instead of reactions
- Variable message content to go along with the qotd embed.
npm i discord.js-qotd
poll(message: Discord.Message, args: string[], separator: string, embedColor: Discord.ColorResolvable, emoji: string)
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', "🤷♂️");
},
};
!qotd Is this a poll?
This will return an embed message with 'Is this a poll?' as title and with 👍 and 👎 reactions.
!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)
Disclaimer: This module was originally created by nicolasmf under the name discord.js-poll. The original code for this plugin was taken from there in accordance with its MIT license. I took on this project due to lack of updates, functionality and v13 support from nicholasmf.