import command from "../classes/command"; import client from "../classes/customClient"; import category from "../enums/category"; import { ActionRowBuilder, ApplicationCommandOptionType, ButtonBuilder, ButtonStyle, CacheType, ChatInputCommandInteraction, PermissionsBitField, StringSelectMenuBuilder, StringSelectMenuOptionBuilder } from "discord.js"; import subCommand from '../classes/subCommand'; const { ActionRow, ButtonInteraction, MessageActionRow, MessageButton, SelectMenuInteraction, MessageSelectMenu } = require('discord.js'); const fs = require('fs'); export default class help extends command { constructor(client: client){ super(client, { name: "help", description: "help menu", category: category.utilities, default_member_permissions: PermissionsBitField.Flags.UseApplicationCommands, dm_permissions: true, cooldown: 3, options: [ ], dev: false, }) } async execute(interaction: ChatInputCommandInteraction) { const slashCommands = await interaction.client.application.commands.fetch(); const feedback = new ButtonBuilder() .setCustomId('feedback') .setLabel('Feedback') .setStyle(ButtonStyle.Primary); const vote = new ButtonBuilder() .setLabel('Vote') .setStyle(ButtonStyle.Link) .setURL('https://top.gg/bot/804914348778717255/vote'); const tos = new ButtonBuilder() .setLabel('ToS') .setStyle(ButtonStyle.Link) .setURL('https://discord.com/guidelines'); const privacy =new ButtonBuilder() .setLabel('Privacy') .setStyle(ButtonStyle.Link) .setURL('https://discord.com/guidelines'); const buttons = new ActionRowBuilder().addComponents(feedback, vote, privacy) const embedMsg = { title: 'Help Command', description: 'Select an option to get the command list of. Only one option can be selected.', fields: [ { name: 'Total Command Categories', value: `1`, inline: true, }, { name: 'Global Slash Commands', value: `${slashCommands.size}`, inline: true, }, ], color: 0x7289DA, }; let helpMenu = new StringSelectMenuBuilder() .setCustomId('helpMenu') .setPlaceholder('Select a category') .addOptions( new StringSelectMenuOptionBuilder() .setLabel('Category') .setDescription('asdeasd') .setValue("asd") ); const helpMenua = new ActionRowBuilder().addComponents(helpMenu) await interaction.reply({content: "hi", components: [buttons, helpMenua]}); } }