Discord-Bot/src/handlers/helppanel/changelogs.js
2022-12-14 16:57:55 +01:00

68 lines
No EOL
2.9 KiB
JavaScript

const Discord = require('discord.js');
module.exports = async (client) => {
client.on(Discord.Events.InteractionCreate, async (interaction) => {
if (!interaction.isStringSelectMenu()) return;
if (interaction.customId == "Bot-helppanel") {
if (interaction.values == "changelogs-Bothelp") {
interaction.deferUpdate();
const row = new Discord.ActionRowBuilder()
.addComponents(
new Discord.StringSelectMenuBuilder()
.setCustomId('Bot-helppanel')
.setPlaceholder('❌┆Nothing selected')
.addOptions([
{
label: `Commands`,
description: `Show the commands of Bot!`,
emoji: "💻",
value: "commands-Bothelp",
},
{
label: `Invite`,
description: `Invite Bot to your server`,
emoji: "📨",
value: "invite-Bothelp",
},
{
label: `Support server`,
description: `Join the suppport server`,
emoji: "❓",
value: "support-Bothelp",
},
{
label: `Changelogs`,
description: `Show the bot changelogs`,
emoji: "📃",
value: "changelogs-Bothelp",
},
]),
);
client.embed({
title: "📃・Changelogs",
desc: `_____`,
thumbnail: client.user.avatarURL({ size: 1024 }),
fields: [
{
name: "📢┆Alert!",
value: 'This is the changelogs of the bot, here you can see the changes that have been made to the bot.',
inline: false,
},
{
name: "📃┆Changelogs",
value: '10/12/2022 - Updated the bot to the latest version of discord.js (v14)',
inline: false,
}
],
components: [row],
type: 'edit'
}, interaction.message)
}
}
}).setMaxListeners(0);
}