discord.js-qotd
v1.5.1
Published
A Question of the Day command for discord bots!
Downloads
32
Readme
discord.js-qotd
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
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.
!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)