What I want to do is have a help menu, and when you react it sends a new embed (or edits the existing embed if that's easier). I have tried what seems to be every method but the right one for about a week and a half but I can't figure it out. I am very new to coding. Thank you for your time <3
This is my code...
module.exports = {
name: 'help',
description: "React to the emojis below",
async execute(message, args, Discord, client) {
let newEmbed = new Discord.MessageEmbed()
.setColor('#FFEEA3')
.setTitle('Help')
.setDescription('React to the corresponding emoji below to to recieve more specific help.')
.addFields(
{ name: 'Ban (Admin)', value: ':no_entry:' },
{ name: 'Clear (Admin)', value: ':person_with_probing_cane:' },
{ name: 'Kick (Admin)', value: ':leg:' },
{ name: 'Mute (Admin)', value: ':mute:' },
{ name: 'Unmute (Admin)', value: ':loud_sound:' },
{ name: 'Perms', value: ':lock:' },
{ name: 'Ping', value: ':ping_pong:' },
{ name: 'Rules', value: ':closed_book: ' },
)
.setFooter('Make sure to check out the help channel if there is one');
let embedtwo = new Discord.MessageEmbed()
.setColor('#FFEEA3')
.setTitle('apple')
.setDescription('apple');
let embedthree = new Discord.MessageEmbed()
.setColor('#FFEEA3')
.setTitle('banana')
.setDescription('banana');
const MessageEmbed = await message.channel.send(newEmbed);
MessageEmbed.react('⛔');
MessageEmbed.react('');
MessageEmbed.react('');
MessageEmbed.react('');
MessageEmbed.react('');
MessageEmbed.react('');
MessageEmbed.react('');
MessageEmbed.react('');
const filter = (reaction, user) => {
return [banpg,clearpg].includes(reaction.emoji.name) && user.id === message.author.id;
};
message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
.then(collected => {
const reaction = collected.first();
if (reaction.emoji.name === '⛔')
{
message.channel.send(embedtwo);
} else if (reaction.emoji.name === '')
message.channel.send(embedthree);
})
.catch(collected => {
message.reply('you did not react in time');
});
}}```