From 4de5921880808e736a0b9b05a22a097e21ab9765 Mon Sep 17 00:00:00 2001 From: Kkkermit Date: Sat, 22 Jun 2024 17:45:01 +0100 Subject: [PATCH] add: Added help command and big fixes --- .vscode/settings.json | 1 + src/commands/Community/ping.js | 11 - src/commands/Fun/pepeSign.js | 2 +- src/commands/Help/help.js | 91 +++++ src/events/interactionCreate.js | 69 ---- src/index.js | 649 ++++++++++++++++++++++++++++++++ 6 files changed, 742 insertions(+), 81 deletions(-) delete mode 100644 src/commands/Community/ping.js create mode 100644 src/commands/Help/help.js diff --git a/.vscode/settings.json b/.vscode/settings.json index 4897668..97b92fe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -50,6 +50,7 @@ "torquise", "Unboost", "Unboosted", + "Unmutes", "userverdata", "verificationdata", "verifybutton", diff --git a/src/commands/Community/ping.js b/src/commands/Community/ping.js deleted file mode 100644 index f0f0789..0000000 --- a/src/commands/Community/ping.js +++ /dev/null @@ -1,11 +0,0 @@ -const { SlashCommandBuilder } = require('discord.js') - -module.exports = { - data: new SlashCommandBuilder() - .setName('ping') - .setDescription(`Replies with pong`), - async execute(interaction) { - await interaction.reply({ content: "Sent message in channel", ephemeral: true}) - await interaction.channel.send({ content: 'Pong!'}) - } -} \ No newline at end of file diff --git a/src/commands/Fun/pepeSign.js b/src/commands/Fun/pepeSign.js index 5a7fdf4..dc1cb4c 100644 --- a/src/commands/Fun/pepeSign.js +++ b/src/commands/Fun/pepeSign.js @@ -15,7 +15,7 @@ module.exports = { const signText = interaction.options.getString("text").trim(); - if (filter.words.includes(text)) return interaction.reply({ content: `${client.config.filterMessage}`, ephemeral: true}); + if (filter.words.includes(signText)) return interaction.reply({ content: `${client.config.filterMessage}`, ephemeral: true}); const maxLineWidth = 60; let lines = []; diff --git a/src/commands/Help/help.js b/src/commands/Help/help.js new file mode 100644 index 0000000..17d08e6 --- /dev/null +++ b/src/commands/Help/help.js @@ -0,0 +1,91 @@ +const { SlashCommandBuilder, StringSelectMenuBuilder, ButtonStyle, ButtonBuilder, EmbedBuilder, ActionRowBuilder } = require('discord.js'); +var timeout = []; + +module.exports = { + data: new SlashCommandBuilder() + .setName('help') + .setDescription('Cannot find what you were wishing to? Check this out!') + .addSubcommand(command => command.setName('server').setDescription('Join our official support server for Orbit!')) + .addSubcommand(command => command.setName('manual').setDescription('Get some information on our bot commands and plans.')), + async execute(interaction, client) { + + const sub = interaction.options.getSubcommand(); + + switch (sub) { + case 'server': + + const button = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setLabel('Support Server') + .setStyle(ButtonStyle.Link) + .setURL("https://discord.gg/xcMVwAVjSD") + ) + + + const embedHelpServer = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setFooter({ text: `πŸš‘ ${client.user.username}'s support server`}) + .setTimestamp() + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}`}) + .setDescription(`> Join our official support server for ${client.user.username}! \n> Get help, report bugs, and more!`) + .setThumbnail(client.user.avatarURL()) + .addFields({ name: `Manual link to the Discord server:`, value: `> [SERVER](https://discord.gg/xcMVwAVjSD)`}) + + await interaction.reply({ embeds: [embedHelpServer], components: [button] }) + + break; + case 'manual': + + const helprow1 = new ActionRowBuilder() + .addComponents( + + new StringSelectMenuBuilder() + .setMinValues(1) + .setMaxValues(1) + .setCustomId('selecthelp') + .setPlaceholder('β€’ Select a menu') + .addOptions( + { + label: 'β€’ Help Center', + description: 'Navigate to the Help Center.', + value: 'helpcenter', + }, + + { + label: 'β€’ How to add the bot', + description: `Displays how to add ${client.user.username} to your amazing server.`, + value: 'howtoaddbot' + }, + + { + label: 'β€’ Feedback', + description: `Displays how to contribute to the development of ${client.user.username} by giving feedback.`, + value: 'feedback' + }, + + { + label: 'β€’ Commands Help', + description: 'Navigate to the Commands help page.', + value: 'commands', + }, + ), + ); + + const embed = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}`}) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center`}) + .setThumbnail(client.user.avatarURL()) + .addFields({ name: `β€’ Commands Help`, value: `> Get all **Commands** (**${client.commands.size}** slash & **${client.pcommands.size}** prefix) ${client.user.username} looks over!`}) + .addFields({ name: "β€’ How to add Bot", value: `> Quick guide on how to add our **${client.user.username}** \n> to your server.`}) + .addFields({ name: "β€’ Feedback", value: "> How to send us feedback and suggestions."}) + .addFields({ name: "β€’ Exclusive Functionality", value: `> Guide on how to receive permission to \n> use exclusive functionality (${client.user.username} Beta version).`}) + .setTimestamp() + + await interaction.reply({ embeds: [embed], components: [helprow1] }); + } + } +} \ No newline at end of file diff --git a/src/events/interactionCreate.js b/src/events/interactionCreate.js index 05527ed..115a7e4 100644 --- a/src/events/interactionCreate.js +++ b/src/events/interactionCreate.js @@ -35,75 +35,6 @@ module.exports = { console.error(`${color.red}[${getTimestamp()}] [INTERACTION_CREATE] Error while executing command. \n${color.red}[${getTimestamp()}] [INTERACTION_CREATE] Please check you are using the correct execute method: "async execute(interaction, client)":`, error); - const channelID = `${client.config.commandErrorChannel}`; - const channel = client.channels.cache.get(channelID); - - const embed = new EmbedBuilder() - .setColor("Blue") - .setTimestamp() - .setAuthor({ name: `${client.user.username} Command Error`, iconURL: client.user.avatarURL()}) - .setFooter({ text: 'Error Reported At' }) - .setTitle('Command Execution Error') - .setDescription('An error occurred while executing the command.') - .addFields( - { name: '> β€’ Command', value: `\`\`\`${interaction.commandName}\`\`\`` }, - { name: '> β€’ Triggered By', value: `\`\`\`${interaction.user.username}#${interaction.user.discriminator}\`\`\`` }, - { name: '> β€’ Error Stack', value: `\`\`\`${error.stack}\`\`\`` }, - { name: '> β€’ Error Message', value: `\`\`\`${error.message}\`\`\`` }); - - const yellowButton = new ButtonBuilder() - .setCustomId('change_color_yellow') - .setLabel('Mark As Pending') - .setStyle('1'); - - const greenButton = new ButtonBuilder() - .setCustomId('change_color_green') - .setLabel('Mark As Solved') - .setStyle('3'); - - const redButton = new ButtonBuilder() - .setCustomId('change_color_red') - .setLabel('Mark As Unsolved') - .setStyle('4'); - - const row = new ActionRowBuilder() - .addComponents(yellowButton, greenButton, redButton); - - client.on('interactionCreate', async (interaction) => { - try { - if (!interaction.isButton()) return; - if (interaction.message.id !== message.id) return; - - const { customId } = interaction; - - if (customId === 'change_color_yellow') { - embed.setColor('#FFFF00'); - await interaction.reply({ - content: 'This error has been marked as pending.', - ephemeral: true, - }); - } else if (customId === 'change_color_green') { - embed.setColor('#00FF00'); - await interaction.reply({ - content: 'This error has been marked as solved.', - ephemeral: true, - }); - } else if (customId === 'change_color_red') { - embed.setColor('#FF0000'); - await interaction.reply({ - content: 'This error has been marked as unsolved.', - ephemeral: true, - }); - } - await message.edit({ embeds: [embed], components: [row] }); - await interaction.deferUpdate(); - } catch (error) { - client.logs.error('[ERROR_LOGGING] Error in button interaction:', error); - } - }); - - const message = await channel.send({ embeds: [embed], components: [row] }); - const errorEmbed = new EmbedBuilder() .setColor("Red") .setDescription(`There was an error while executing this command!\n\`\`\`${error}\`\`\``) diff --git a/src/index.js b/src/index.js index 3d657ec..7e51a08 100644 --- a/src/index.js +++ b/src/index.js @@ -753,3 +753,652 @@ client.on(Events.MessageCreate, async (message) => { } } }) + +// Advanced Help Menu // + +client.on(Events.InteractionCreate, async (interaction, err) => { + + const helprow2 = new ActionRowBuilder() + .addComponents( + + new StringSelectMenuBuilder() + .setMinValues(1) + .setMaxValues(1) + .setCustomId('selecthelp') + .setPlaceholder('β€’ Select a menu') + .addOptions( + { + label: 'β€’ Help Center', + description: 'Navigate to the Help Center.', + value: 'helpcenter', + }, + + { + label: 'β€’ How to add the bot', + description: `Displays how to add ${client.user.username} to your amazing server.`, + value: 'howtoaddbot' + }, + + { + label: 'β€’ Feedback', + description: `Displays how to contribute to the development of ${client.user.username} by giving feedback.`, + value: 'feedback' + }, + + { + label: 'β€’ Commands Help', + description: 'Navigate to the Commands help page.', + value: 'commands', + }, + ), + ); + + if (!interaction.isStringSelectMenu()) return; + if (interaction.customId === 'selecthelp') { + let choices = ""; + + const centerembed = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}`}) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center`}) + .setThumbnail(client.user.avatarURL()) + .addFields({ name: `β€’ Commands Help`, value: `> Get all **Commands** (**${client.commands.size}** slash & **${client.pcommands.size}** prefix) ${client.user.username} looks over!`}) + .addFields({ name: "β€’ How to add Bot", value: `> Quick guide on how to add our **${client.user.username}** \n> to your server.`}) + .addFields({ name: "β€’ Feedback", value: "> How to send us feedback and suggestions."}) + .addFields({ name: "β€’ Exclusive Functionality", value: `> Guide on how to receive permission to \n> use exclusive functionality (${client.user.username} Beta version).`}) + .setTimestamp(); + + interaction.values.forEach(async (value) => { + choices += `${value}`; + + if (value === 'helpcenter') { + + setTimeout(() => { + interaction.update({ embeds: [centerembed] }).catch(err); + }, 100) + + } + + if (value === 'howtoaddbot') { + + setTimeout(() => { + const howtoaddembed = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setDescription(`> **How to add ${client.user.username} to your server**`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}`}) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Adding bot`}) + .setThumbnail(client.user.avatarURL()) + .addFields({ name: `β€’ How to add ${client.user.username} to your server`, value: `> To add ${client.user.username} to your server, simple click on the bots profile and click, \`\`add app\`\`.` }) + .addFields({ name: "β€’ Wait.. what Official Discord server..", value: "> This is our Discord server: https://discord.gg/xcMVwAVjSD" }) + .addFields({ name: "β€’ Our official website..", value: "> This is our official website: https://testify.lol "}) + .setTimestamp(); + + interaction.update({ embeds: [howtoaddembed] }).catch(err); + }, 100) + } + + if (value === 'feedback') { + + setTimeout(() => { + const feedbackembed = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setDescription(`> **How to give feedback on ${client.user.username}**`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Sending feedback` }) + .setThumbnail(client.user.avatarURL()) + .addFields({ name: "β€’ How can I give Feedback?", value: `> The creator of ${client.user.username} appreciates your opinion on our the bot. To send feedback or suggestions, use the command below. \n > Alternatively, if you spot or come across a bug, be sure to report it to us with the command below.` }) + .addFields({ name: "β€’ /suggestion", value: "> Opens up a suggestion form" }) + .addFields({ name: "β€’ /bug-report", value: "> Opens a bug report" }) + .setTimestamp(); + + interaction.update({ embeds: [feedbackembed] }).catch(err); + }, 100) + } + + if (value === 'commands') { + + const commandpage1 = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Commands Page 1` }) + .setThumbnail(client.user.avatarURL()) + .setDescription(`> **Commands Help Page \`\`1\`\`**`) + .addFields({ name: "β€’ /account-view", value: "> View your economy account information." }) + .addFields({ name: "β€’ /add emoji", value: "> Adds an emoji to the server." }) + .addFields({ name: "β€’ /add sticker", value: "> Adds a sticker to the server." }) + .addFields({ name: "β€’ /advice", value: "> Gives you a random piece of advice." }) + .addFields({ name: "β€’ /animal-facts", value: "> Gives you a random animal fact." }) + .addFields({ name: "β€’ /announce", value: "> Announces a message in a specified channel." }) + .addFields({ name: "β€’ /ascii", value: "> Converts text to ascii." }) + .addFields({ name: "β€’ /automod flagged-words", value: "> Sets up the automod system for flagged words." }) + .addFields({ name: "β€’ /automod keyword", value: "> Sets up the automod system for keywords." }) + .addFields({ name: "β€’ /automod mention-spam", value: "> Sets up the automod system for mention-spam." }) + .addFields({ name: "β€’ /automod spam-messages", value: "> Sets up the automod system for spam-messages." }) + .addFields({ name: "β€’ /autorole-add", value: "> Adds a role to the autorole system." }) + .addFields({ name: "β€’ /autorole-disable", value: "> Disables the autorole system." }) + .addFields({ name: "β€’ /autorole-enable", value: "> Enables the autorole system." }) + .addFields({ name: "β€’ /autorole-remove", value: "> Removes a role from the autorole system." }) + .addFields({ name: "β€’ /avatar", value: "> Shows a users avatar." }) + .addFields({ name: "β€’ /ban", value: "> Bans a user for a specified reason." }) + .addFields({ name: "β€’ /beg", value: "> Beg for money. Results may vary." }) + .addFields({ name: "β€’ /bot-specs", value: "> Shows the bots specifications." }) + .addFields({ name: "β€’ /bot-uptime", value: "> Shows the bots current uptimes." }) + .addFields({ name: "β€’ /bug-report", value: "> Opens a bug report." }) + .addFields({ name: "β€’ /calculate", value: "> Calculates a math problem." }) + .addFields({ name: "β€’ /chat", value: "> Chat with an AI modal." }) + .addFields({ name: "β€’ /clear", value: "> Clears a specified amount of messages." }) + .addFields({ name: "β€’ /coin-flip", value: "> Flips a coin." }) + + + .setImage('https://i.postimg.cc/8CbGp6D5/Screenshot-300.png') + .setTimestamp(); + + const commandpage2 = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Commands Page 2` }) + .setThumbnail(client.user.avatarURL()) + .setDescription(`> **Commands Help Page \`\`2\`\`**`) + .addFields({ name: "β€’ /counting disable", value: "> Disables the counting system." }) + .addFields({ name: "β€’ /counting enable", value: "> Enables the counting system." }) + .addFields({ name: "β€’ /create embed", value: "> Creates an embed." }) + .addFields({ name: "β€’ /create thread", value: "> Creates a thread." }) + .addFields({ name: "β€’ /dad-joke", value: "> Tells a dad joke." }) + .addFields({ name: "β€’ /daily", value: "> Collect your daily reward." }) + .addFields({ name: "β€’ /deposit", value: "> Deposits a specified amount of balance to the bank." }) + .addFields({ name: "β€’ /dictionary", value: "> Searches the dictionary for a word." }) + .addFields({ name: "β€’ /economy-create account", value: "> Creates an economy account." }) + .addFields({ name: "β€’ /economy-delete account", value: "> Deletes an economy account." }) + .addFields({ name: "β€’ /fake-tweet", value: "> Creates a fake tweet." }) + .addFields({ name: "β€’ /fast-type", value: "> Starts a fast type game." }) + .addFields({ name: "β€’ /gamble", value: "> Gambles a specified amount of balance." }) + .addFields({ name: "β€’ /give currency", value: "> Gives a specified user a specified amount of currency." }) + .addFields({ name: "β€’ /give xp", value: "> Gives a specified user a specified amount of XP." }) + .addFields({ name: "β€’ /giveaway edit", value: "> edits the current giveaway." }) + .addFields({ name: "β€’ /giveaway end", value: "> Ends the current giveaway." }) + .addFields({ name: "β€’ /giveaway reroll", value: "> Rerolls the current giveaway." }) + .addFields({ name: "β€’ /giveaway start", value: "> Starts a giveaway." }) + .addFields({ name: "β€’ /guess the pokemon", value: "> Starts a game of guess the pokemon." }) + .addFields({ name: "β€’ /hack", value: "> Hacks a user (fake)." }) + .addFields({ name: "β€’ /help manual", value: "> Displays the help menu." }) + .addFields({ name: "β€’ /help server", value: "> Displays the help server." }) + .addFields({ name: "β€’ /how drunk", value: "> Displays how drunk you are." }) + .addFields({ name: "β€’ /how gay", value: "> Displays how gay you are." }) + + .setImage('https://i.postimg.cc/8CbGp6D5/Screenshot-300.png') + .setTimestamp(); + + const commandpage3 = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Commands Page 3` }) + .setThumbnail(client.user.avatarURL()) + .setDescription(`> **Commands Help Page \`\`3\`\`**`) + .addFields({ name: "β€’ /how high", value: "> Displays how high you are." }) + .addFields({ name: "β€’ /how simp", value: "> Displays how much of a simp you are." }) + .addFields({ name: "β€’ /how stupid", value: "> Displays how stupid you are." }) + .addFields({ name: "β€’ /how sus", value: "> Displays how sus you are." }) + .addFields({ name: "β€’ /impersonate", value: "> Impersonates a user." }) + .addFields({ name: "β€’ /iq", value: "> Displays your IQ." }) + .addFields({ name: "β€’ /khalid-quote", value: "> Displays a random Khalid quote." }) + .addFields({ name: "β€’ /kick", value: "> Kicks a user for a specified reason." }) + .addFields({ name: "β€’ /latency", value: "> Displays the bots latency." }) + .addFields({ name: "β€’ /leaderboard", value: "> Displays the server leaderboard." }) + .addFields({ name: "β€’ /leveling-system disable", value: "> Disables leveling for the server." }) + .addFields({ name: "β€’ /leveling-system disable-multiplier", value: "> Disables the leveling multiplier." }) + .addFields({ name: "β€’ /leveling-system enable", value: "> Enables leveling for the server." }) + .addFields({ name: "β€’ /leveling-system role-multiplier", value: "> Sets up a leveling multiplier role." }) + .addFields({ name: "β€’ /lock", value: "> Locks a channel." }) + .addFields({ name: "β€’ /logs-disable", value: "> Disables the logs." }) + .addFields({ name: "β€’ /logs-setup", value: "> Enables the logs." }) + .addFields({ name: "β€’ /lyrics", value: "> Displays the lyrics of a song." }) + .addFields({ name: "β€’ /master-oogway", value: "> Generate a quote from master oogway." }) + .addFields({ name: "β€’ /member-count", value: "> Displays the server member count." }) + .addFields({ name: "β€’ /members-vc bot-remove", value: "> Disables the total bots voice channel." }) + .addFields({ name: "β€’ /members-vc bot-set", value: "> Sets up the total bots voice channel." }) + .addFields({ name: "β€’ /members-vc total-remove", value: "> Disables the total members voice channel." }) + .addFields({ name: "β€’ /members-vc total-set", value: "> Sets up the total members voice channel." }) + .addFields({ name: "β€’ /meme", value: "> Displays a random meme." }) + + .setImage('https://i.postimg.cc/8CbGp6D5/Screenshot-300.png') + .setTimestamp(); + + const commandpage4 = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Commands Page 4` }) + .setThumbnail(client.user.avatarURL()) + .setDescription(`> **Commands Help Page \`\`4\`\`**`) + .addFields({ name: "β€’ /minecraft-server", value: "> Displays information about a minecraft server." }) + .addFields({ name: "β€’ /minecraft-skin", value: "> Displays the skin of a minecraft user." }) + .addFields({ name: "β€’ /minigame 2048", value: "> Starts a game of 2048." }) + .addFields({ name: "β€’ /minigame connect4", value: "> Starts a game of connect4." }) + .addFields({ name: "β€’ /minigame find-emoji", value: "> Starts a game of find-emoji." }) + .addFields({ name: "β€’ /minigame flood", value: "> Starts a game of flood-it." }) + .addFields({ name: "β€’ /minigame hangman", value: "> Starts a game of hangman." }) + .addFields({ name: "β€’ /minigame match-pairs", value: "> Starts a game of match-pairs." }) + .addFields({ name: "β€’ /minigame minesweeper", value: "> Starts a game of minesweeper." }) + .addFields({ name: "β€’ /minigame rps", value: "> Starts a game of rock-paper-scissors." }) + .addFields({ name: "β€’ /minigame slots", value: "> Starts a game of slots." }) + .addFields({ name: "β€’ /minigame snake", value: "> Starts a game of snake." }) + .addFields({ name: "β€’ /minigame tictactoe", value: "> Starts a game of tictactoe." }) + .addFields({ name: "β€’ /minigame wordle", value: "> Starts a game of wordle." }) + .addFields({ name: "β€’ /minigame would-you-rather", value: "> Starts a game of would you rather." }) + .addFields({ name: "β€’ /mod-panel", value: "> Opens the moderation panel." }) + .addFields({ name: "β€’ /movie-tracker", value: "> Displays info about a given movie" }) + .addFields({ name: "β€’ /mute", value: "> Mutes a user for a specified reason." }) + .addFields({ name: "β€’ /nick", value: "> Changes a users nickname." }) + .addFields({ name: "β€’ /nitro", value: "> Generates a nitro code. (fake)" }) + .addFields({ name: "β€’ /pepe-sign", value: "> Generates a pepe sign." }) + .addFields({ name: "β€’ /permissions", value: "> Displays a users permissions." }) + .addFields({ name: "β€’ /ping", value: "> Displays the bots ping." }) + .addFields({ name: "β€’ /pp-size", value: "> Displays your pp size." }) + .addFields({ name: "β€’ /prefix-help", value: "> Displays the prefix help." }) + + .setImage('https://i.postimg.cc/8CbGp6D5/Screenshot-300.png') + .setTimestamp(); + + const commandpage5 = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Commands Page 5` }) + .setThumbnail(client.user.avatarURL()) + .setDescription(`> **Commands Help Page \`\`5\`\`**`) + .addFields({ name: "β€’ /profile-create", value: "> Creates a users profile." }) + .addFields({ name: "β€’ /profile-edit", value: "> Edits a users profile." }) + .addFields({ name: "β€’ /profile-view", value: "> Views a users profile." }) + .addFields({ name: "β€’ /radio", value: "> Plays a radio station in a voice channel." }) + .addFields({ name: "β€’ /rank", value: "> Displays a users rank." }) + .addFields({ name: "β€’ /relationship-checker", value: "> Displays a users relationship status with another user." }) + .addFields({ name: "β€’ /reset all-currency", value: "> Resets all economy currency for the server." }) + .addFields({ name: "β€’ /reset all-xp", value: "> Resets all economy XP for the server." }) + .addFields({ name: "β€’ /reset currency", value: "> Resets a users economy currency." }) + .addFields({ name: "β€’ /reset xp", value: "> Resets a users economy XP." }) + .addFields({ name: "β€’ /rob", value: "> Robs a user for a specified amount." }) + .addFields({ name: "β€’ /role-add", value: "> Adds a role to a user." }) + .addFields({ name: "β€’ /role-remove", value: "> Removes a role from a user." }) + .addFields({ name: "β€’ /role-info", value: "> Displays information about a role." }) + .addFields({ name: "β€’ /say", value: "> Makes the bot say a message." }) + .addFields({ name: "β€’ /server-info", value: "> Displays information about the server." }) + .addFields({ name: "β€’ /slow-mode-check", value: "> Checks the slowmode of a channel." }) + .addFields({ name: "β€’ /slow-mode-off", value: "> Disables the slowmode of a channel." }) + .addFields({ name: "β€’ /slow-mode-set", value: "> Sets the slowmode of a channel." }) + .addFields({ name: "β€’ /soundboard", value: "> Plays a sound in a voice channel." }) + .addFields({ name: "β€’ /spotify", value: "> Displays information about a spotify track the users listing to." }) + .addFields({ name: "β€’ /sticky-message-check", value: "> Displays active sticky message(s)." }) + .addFields({ name: "β€’ /sticky-message-disable", value: "> Disables the sticky message system." }) + .addFields({ name: "β€’ /sticky-message-enable", value: "> Enables the sticky message system." }) + .addFields({ name: "β€’ /suggest", value: "> Suggests a feature for the bot." }) + + .setImage('https://i.postimg.cc/8CbGp6D5/Screenshot-300.png') + .setTimestamp(); + + const commandpage6 = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Commands Page 6` }) + .setThumbnail(client.user.avatarURL()) + .setDescription(`> **Commands Help Page \`\`6\`\`**`) + .addFields({ name: "β€’ /test", value: "> Tests the bot." }) + .addFields({ name: "β€’ /translate", value: "> Translates a message." }) + .addFields({ name: "β€’ /tts", value: "> Text to speech." }) + .addFields({ name: "β€’ /unban", value: "> Unbans a user." }) + .addFields({ name: "β€’ /unlock", value: "> Unlocks a channel." }) + .addFields({ name: "β€’ /unmute", value: "> Unmutes a user." }) + .addFields({ name: "β€’ /user-info", value: "> Displays information about a user." }) + .addFields({ name: "β€’ /verify-disable", value: "> Disables the verification system." }) + .addFields({ name: "β€’ /verify-setup", value: "> Enables the verification system." }) + .addFields({ name: "β€’ /warn clear", value: "> Warns a user." }) + .addFields({ name: "β€’ /warn create", value: "> Creates a warning." }) + .addFields({ name: "β€’ /warn edit", value: "> Edits a warning." }) + .addFields({ name: "β€’ /warn info", value: "> Displays information about a warning." }) + .addFields({ name: "β€’ /warn list", value: "> Lists all warnings." }) + .addFields({ name: "β€’ /warn remove", value: "> Removes a warning." }) + .addFields({ name: "β€’ /welcome-system remove", value: "> Disables the welcome system." }) + .addFields({ name: "β€’ /welcome-system set", value: "> Enables the welcome system." }) + .addFields({ name: "β€’ /wiki", value: "> Searches wikipedia for a query." }) + .addFields({ name: "β€’ /wipe-user-data", value: "> Wipes a users data." }) + .addFields({ name: "β€’ /withdraw", value: "> Withdraws a specified amount of balance from the bank." }) + .addFields({ name: "β€’ /work", value: "> Work for money." }) + + .setImage('https://i.postimg.cc/8CbGp6D5/Screenshot-300.png') + .setTimestamp(); + + const commandpage7 = new EmbedBuilder() + .setColor(client.config.embedColor) + .setTitle(`${client.user.username} Help Center ${client.config.arrowEmoji}`) + .setAuthor({ name: `πŸš‘ Help Command ${client.config.devBy}` }) + .setFooter({ text: `πŸš‘ ${client.user.username}'s help center: Commands Page 7` }) + .setThumbnail(client.user.avatarURL()) + .setDescription(`> **Commands Help Page \`\`7\`\`**`) + .addFields({ name: 'β€’ More commands coming soon...', value: '> Coming soon.....'}) + + .setImage('https://i.postimg.cc/8CbGp6D5/Screenshot-300.png') + .setTimestamp(); + + + + + const commandbuttons = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setCustomId('helpcenterbutton') + .setLabel('Help Center') + .setStyle(ButtonStyle.Success), + + new ButtonBuilder() + .setCustomId('first') + .setLabel('β—€β—€') + .setDisabled(true) + .setStyle(ButtonStyle.Primary), + + new ButtonBuilder() + .setCustomId('pageleft') + .setLabel('β—€') + .setDisabled(true) + .setStyle(ButtonStyle.Secondary), + + new ButtonBuilder() + .setCustomId('pageright') + .setLabel('β–Ά') + .setStyle(ButtonStyle.Secondary), + new ButtonBuilder() + .setCustomId('last') + .setLabel('β–Άβ–Ά') + .setStyle(ButtonStyle.Primary) + ); + + const commandbuttons1 = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setCustomId('helpcenterbutton1') + .setLabel('Help Center') + .setStyle(ButtonStyle.Success), + + new ButtonBuilder() + .setCustomId('first') + .setLabel('β—€β—€') + .setStyle(ButtonStyle.Primary), + + new ButtonBuilder() + .setCustomId('pageleft1') + .setLabel('β—€') + .setDisabled(false) + .setStyle(ButtonStyle.Secondary), + + new ButtonBuilder() + .setCustomId('pageright1') + .setDisabled(false) + .setLabel('β–Ά') + .setStyle(ButtonStyle.Secondary), + new ButtonBuilder() + .setCustomId('last') + .setLabel('β–Άβ–Ά') + .setStyle(ButtonStyle.Primary) + ); + + const commandbuttons2 = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setCustomId('helpcenterbutton2') + .setLabel('Help Center') + .setStyle(ButtonStyle.Success), + + new ButtonBuilder() + .setCustomId('first') + .setLabel('β—€β—€') + .setStyle(ButtonStyle.Primary), + + new ButtonBuilder() + .setCustomId('pageleft2') + .setLabel('β—€') + .setDisabled(false) + .setStyle(ButtonStyle.Secondary), + + new ButtonBuilder() + .setCustomId('pageright2') + .setDisabled(false) + .setLabel('β–Ά') + .setStyle(ButtonStyle.Secondary), + new ButtonBuilder() + .setCustomId('last') + .setLabel('β–Άβ–Ά') + .setStyle(ButtonStyle.Primary) + ); + + const commandbuttons3 = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setCustomId('helpcenterbutton3') + .setLabel('Help Center') + .setStyle(ButtonStyle.Success), + + new ButtonBuilder() + .setCustomId('first') + .setLabel('β—€β—€') + .setStyle(ButtonStyle.Primary), + + new ButtonBuilder() + .setCustomId('pageleft3') + .setLabel('β—€') + .setDisabled(false) + .setStyle(ButtonStyle.Secondary), + + new ButtonBuilder() + .setCustomId('pageright3') + .setDisabled(false) + .setLabel('β–Ά') + .setStyle(ButtonStyle.Secondary), + new ButtonBuilder() + .setCustomId('last') + .setLabel('β–Άβ–Ά') + .setStyle(ButtonStyle.Primary) + ); + + const commandbuttons4 = new ActionRowBuilder() + .addComponents( + + new ButtonBuilder() + .setCustomId('helpcenterbutton4') + .setLabel('Help Center') + .setStyle(ButtonStyle.Success), + + new ButtonBuilder() + .setCustomId('first') + .setLabel('β—€β—€') + .setStyle(ButtonStyle.Primary), + + new ButtonBuilder() + .setCustomId('pageleft4') + .setLabel('β—€') + .setDisabled(false) + .setStyle(ButtonStyle.Secondary), + + new ButtonBuilder() + .setCustomId('pageright4') + .setDisabled(false) + .setLabel('β–Ά') + .setStyle(ButtonStyle.Secondary), + new ButtonBuilder() + .setCustomId('last') + .setLabel('β–Άβ–Ά') + .setDisabled(true) + .setStyle(ButtonStyle.Primary) + + ); + + const commandbuttons5 = new ActionRowBuilder() + .addComponents( + + new ButtonBuilder() + .setCustomId('helpcenterbutton5') + .setLabel('Help Center') + .setStyle(ButtonStyle.Success), + + new ButtonBuilder() + .setCustomId('first') + .setLabel('β—€β—€') + .setStyle(ButtonStyle.Primary), + + new ButtonBuilder() + .setCustomId('pageleft5') + .setLabel('β—€') + .setDisabled(false) + .setStyle(ButtonStyle.Secondary), + + new ButtonBuilder() + .setCustomId('pageright5') + .setDisabled(false) + .setLabel('β–Ά') + .setStyle(ButtonStyle.Secondary), + new ButtonBuilder() + .setCustomId('last') + .setLabel('β–Άβ–Ά') + .setDisabled(false) + .setStyle(ButtonStyle.Primary) + + ); + + const commandbuttons6 = new ActionRowBuilder() + .addComponents( + + new ButtonBuilder() + .setCustomId('helpcenterbutton6') + .setLabel('Help Center') + .setStyle(ButtonStyle.Success), + + new ButtonBuilder() + .setCustomId('first') + .setLabel('β—€β—€') + .setStyle(ButtonStyle.Primary), + + new ButtonBuilder() + .setCustomId('pageleft6') + .setLabel('β—€') + .setDisabled(false) + .setStyle(ButtonStyle.Secondary), + + new ButtonBuilder() + .setCustomId('pageright6') + .setDisabled(true) + .setLabel('β–Ά') + .setStyle(ButtonStyle.Secondary), + new ButtonBuilder() + .setCustomId('last') + .setLabel('β–Άβ–Ά') + .setDisabled(true) + .setStyle(ButtonStyle.Primary) + + ); + + + await interaction.update({ embeds: [commandpage1], components: [commandbuttons] }).catch(err); + const collector = interaction.message.createMessageComponentCollector({ componentType: ComponentType.Button }); + + collector.on('collect', async (i, err) => { + + if (i.customId === 'last') { + i.update({ embeds: [commandpage7], components: [commandbuttons6] }).catch(err); + } + + if (i.customId === 'first') { + i.update({ embeds: [commandpage1], components: [commandbuttons] }).catch(err); + } + + if (i.customId === 'helpcenterbutton') { + i.update({ embeds: [centerembed], components: [helprow2] }).catch(err); + } + + if (i.customId === 'pageleft') { + i.update({ embeds: [commandpage1], components: [commandbuttons] }).catch(err); + } + + if (i.customId === 'pageright') { + i.update({ embeds: [commandpage2], components: [commandbuttons1] }).catch(err); + } + + if (i.customId === 'helpcenterbutton1') { + i.update({ embeds: [centerembed], components: [helprow2] }).catch(err); + } + + if (i.customId === 'pageright1') { + i.update({ embeds: [commandpage3], components: [commandbuttons2] }).catch(err); + } + + if (i.customId === 'pageleft1') { + i.update({ embeds: [commandpage1], components: [commandbuttons] }).catch(err); + } + + if (i.customId === 'helpcenterbutton2') { + i.update({ embeds: [centerembed], components: [helprow2] }).catch(err); + } + + if (i.customId === 'pageright2') { + i.update({ embeds: [commandpage4], components: [commandbuttons3] }).catch(err); + } + + if (i.customId === 'pageleft2') { + i.update({ embeds: [commandpage2], components: [commandbuttons1] }).catch(err); + } + + if (i.customId === 'helpcenterbutton3') { + i.update({ embeds: [centerembed], components: [helprow2] }).catch(err) + } + + if (i.customId === 'pageright3') { + i.update({ embeds: [commandpage5], components: [commandbuttons4] }).catch(err); + } + + if (i.customId === 'pageleft3') { + i.update({ embeds: [commandpage3], components: [commandbuttons2] }).catch(err); + } + + if (i.customId === 'helpcenterbutton4') { + i.update({ embeds: [centerembed], components: [helprow2] }).catch(err); + } + + if (i.customId === 'pageright4') { + i.update({ embeds: [commandpage6], components: [commandbuttons5] }).catch(err); + } + + if (i.customId === 'pageleft4') { + i.update({ embeds: [commandpage4], components: [commandbuttons3] }).catch(err); + } + + if (i.customId === 'helpcenterbutton5') { + i.update({ embeds: [centerembed], components: [helprow2] }).catch(err); + } + + if (i.customId === 'pageright5') { + i.update({ embeds: [commandpage7], components: [commandbuttons6] }).catch(err); + } + + if (i.customId === 'pageleft5') { + i.update({ embeds: [commandpage5], components: [commandbuttons4] }).catch(err); + } + + if (i.customId === 'helpcenterbutton6') { + i.update({ embeds: [centerembed], components: [helprow2] }).catch(err); + } + + if (i.customId === 'pageright6') { + i.update({ embeds: [commandpage7], components: [commandbuttons6] }).catch(err); + } + + if (i.customId === 'pageleft6') { + i.update({ embeds: [commandpage6], components: [commandbuttons5] }).catch(err); + } + }); + } + }) + } +})