—————————————-CODE—————————————
const { MessageActionRow, MessageButton, MessageSelectMenu, MessageEmbed } = require("discord.js")
const config = require("../../botconfig/main")
module.exports = {
name: "help",
run: async (client, message, args) => {
const row = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId('select')
.setPlaceholder('Nothing selected')
.addOptions([
{
label: 'Main Menu',
description: 'Shows the main menu',
emoji: "909758706290417714",
value: '0',
},
{
label: 'Config Commands',
description: 'Shows all the config commands',
emoji: "888347974944571392",
value: '1',
},
{
label: 'Economy Commands',
description: 'Shows all the economy commands',
emoji: "910512217168941126",
value: '2',
},
{
label: 'Fun Commands',
description: 'Shows all the fun commands',
emoji: "920258063703879700",
value: '3',
},
{
label: 'Games Commands',
description: 'Shows all the game commands',
emoji: "922464211240632330",
value: '4',
},
{
label: 'Information Commands',
description: 'Shows all the information commands',
emoji: "911535908518527018",
value: '5',
},
{
label: 'Moderation Commands',
description: 'Shows all the moderation commands',
emoji: "908346330412355605",
value: '6',
},
{
label: 'Utility Commands',
description: 'Shows all the utility commands',
emoji: "922461948535271425",
value: '7',
},
{
label: 'Level Commands',
description: 'Shows all commandsrelating to level and xp stuff.',
emoji: "925024469720915990",
value: '8',
},
{
label: 'Owner Commands',
description: 'This is for the BOT OWNER only',
emoji: "925024469720915990",
value: '9',
},
]),
);
const row2 = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel("Upvote me!")
.setStyle("LINK")
.setEmoji("859253758903320616")
.setURL("https://dblist.ddns.net/bots/like/879000376274219048"),
new MessageButton()
.setLabel("Invite me")
.setStyle("LINK")
.setEmoji("924283654908313600")
.setURL("https://discord.com/oauth2/authorize?client_id=879000376274219048&scope=bot&permissions=2684354568"),
new MessageButton()
.setLabel("Join Support Server")
.setStyle("LINK")
.setEmoji("866779952162799626")
.setURL("https://discord.gg/5hphccNxTD"),
)
const embed = new MessageEmbed()
.setTitle("**HELP MENU**")
.setDescription(`Pls select a category to see more commands.nn> <:57291theqts:925020896840806460> `Prefix`: ${config.prefix}n> <:67322theqts:925020897587396638> `Total Commands`: ${client.commands.size}n> <:84733theqts:925020897813885019> `Total Servers`: ${client.guilds.cache.size}nn For info on bot commands use `.cmd <command>`n To report bugs, use `/report`nTo make suggestions, use `/suggest``)
.setImage("https://cdn.discordapp.com/attachments/925026772544782366/925064779289227324/b68f7d0b-903b-42cc-9770-f37e49941bdd-preview.png")
.setColor("#f4c2c2")
message.reply({ embeds: , components: [row, row2] })
let embed1 = new MessageEmbed()
.setColor('#FFFFFF')
.setTitle('**HELP MENU**')
.addFields(
{ name: "**CONFIG COMMANDS**", value: "`setchatchannel`,`setautorole`, `set-countingchannel`, `setwelcomechannel`, `setleavechannel`" })
.setImage("https://cdn.discordapp.com/attachments/926113119305105409/926199784153432094/standard_11.gif")
.setColor("#f4c2c2")
.setFooter('Page 1')
let embed2 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields(
{ name: "**ECONOMY COMMANDS**", value: "`balance`, `deposit`, `withdraw`, `search`, `shop`, `inv`, `pet`, `adopt`, `buy`, `sell`, `use`, `gamble`, `multi`, `beg`, `daily`, `fish`, `hunt`, `rob`, `rich` `postmeme`" })
.setColor("#f4c2c2")
.setImage("https://cdn.discordapp.com/attachments/926113119305105409/926199784153432094/standard_11.gif")
.setFooter('Page 2')
let embed3 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields(
{ name: "**FUN COMMANDS**", value: "`8ball`, `activity`, `pixelize`, `meme`, `changemymind`,`clyde`, `slap`, `nitro`, `wasted`, `say`, `quote`, `punch`, `owo`, `lovecalc`, `smug`, `eject`, `emojify`" })
.setColor("#f4c2c2")
.setImage("https://cdn.discordapp.com/attachments/926113119305105409/926199784153432094/standard_11.gif")
.setFooter('Page 3')
let embed4 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields(
{ name: "**GAMES COMMANDS**", value: "`c4`, `tictactoe`, `roadrace`, `snake`, `football`, `quickclick`, `catchthefish`, `akinator`, `trivia`, " })
.setImage("https://cdn.discordapp.com/attachments/926113119305105409/926199784153432094/standard_11.gif")
.setColor("#f4c2c2")
.setFooter('Page 4')
let embed5 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields(
{ name: "**INFO COMMANDS**", value: "`help`, `cmd`, `botinfo`, `ping`, `invite`, `embed`, `ticket-panel`" })
.setImage("https://cdn.discordapp.com/attachments/926113119305105409/926199784153432094/standard_11.gif")
.setColor("#f4c2c2")
.setFooter('Page 5')
let embed6 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields(
{ name: "**MOD COMMANDS**", value: "`ban`, `addroleall`, `removeroleall`, `softban`, `purge`, `mute`, `kick`, `tempmute`, `nuke` `stealemoji`, `resetwarns`, `warnings`, `warn`, `rmvwarn`,`addrole`, `removerole`" })
.setFooter('Page 6')
.setImage("https://cdn.discordapp.com/attachments/926113119305105409/926199784153432094/standard_11.gif")
.setColor("#f4c2c2")
let embed7 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields({ name: "**UTILITY COMMANDS**", value: "`addtag`, `edittag`, `removetag`, `afk`, `rolelist`, `snipe`, `timer`, `calculator`, `avatar`, `serverinfo`, `ss`, `dump`" })
.setImage("https://cdn.discordapp.com/attachments/926113119305105409/926199784153432094/standard_11.gif")
.setColor("#f4c2c2")
.setFooter('Page 7')
let embed8 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields({ name: "**LEVEL COMMANDS**", value: "`rank`, `leaderboard`, `addrole`, `removerole`, `listroles`" })
.setImage("https://cdn.discordapp.com/attachments/925037840977526896/925057005335511101/b68f7d0b-903b-42cc-9770-f37e49941bdd-preview.png")
.setColor("#f4c2c2")
.setFooter('Page 8')
let embed9 = new MessageEmbed()
.setTitle('**Help Menu**')
.setColor('#FFFFFF')
.addFields({ name: "**OWNER COMMANDS**", value: "`addpremium`, `eval`, `reload`, `remove-premium`, `slt`, `terminal` " })
.addFields({ name: "**OWNER ECONOMY COMMANDS**", value: "`addcoins`, `addbank`, `rmvcoins`, `rmvbank`, `resetcoins`, `resetbank`, `deluser`" })
.setImage("https://cdn.discordapp.com/attachments/925037840977526896/925057005335511101/b68f7d0b-903b-42cc-9770-f37e49941bdd-preview.png")
.setColor("#f4c2c2")
.setFooter('Page 9')
const filter = i => i.user.id === message.author.id;
const collector = message.channel.createMessageComponentCollector({
filter,
time: 40000,
componentType: "SELECT_MENU"
});
collector.on("collect", async (collected) => {
const value = collected.values[0]
if (value === "0") {
collected.edit({ embeds: , components: [row, row2] })
}
if (value === "1") {
collected.edit({ embeds: [embed1], components: [row, row2] })
}
if (value === "2") {
collected.edit({ embeds: [embed2], components: [row, row2] })
}
if (value === "3") {
collected.edit({ embeds: [embed3], components: [row, row2] })
}
if (value === "4") {
collected.edit({ embeds: [embed4], components: [row, row2] })
}
if (value === "5") {
collected.edit({ embeds: [embed5], components: [row, row2] })
}
if (value === "6") {
collected.edit({ embeds: [embed6], components: [row, row2] })
}
if (value === "7") {
collected.edit({ embeds: [embed7], components: [row, row2] })
}
if (value === "8") {
collected.edit({ embeds: [embed8], components: [row, row2] })
}
if (value === "9") {
collected.edit({ embeds: [embed9], components: [row, row2] })
}
})
}
}
—————————————-NOTE—————————————
So this is my help command code. When i run the command it replies but doesnt update menu when i choose a menu it rather sends an error code in console saying DiscordAPIError: Unknown interaction
. Ive tried lots of ways to fix this but none worked. Please help