Advertisement
Guest User

Untitled

a guest
Jul 31st, 2022
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { SlashCommandBuilder } = require('@discordjs/builders');
  2. const { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
  3.  
  4. module.exports = {
  5.     data: new SlashCommandBuilder()
  6.         .setName('suggest')
  7.         .setDescription('Send a suggestion to the developers'),
  8.     help: {
  9.         name: "Suggest",
  10.         description: "Send a suggestion to the developers",
  11.     },
  12.     async execute(client, interaction) {
  13.         const modal = new ModalBuilder()
  14.             .setCustomId('suggestion')
  15.             .setTitle('Suggesion');
  16.        
  17.         const title = new TextInputBuilder()
  18.             .setCustomId('title')
  19.             .setLabel("Title")
  20.             .setStyle(TextInputStyle.Short);
  21.        
  22.         const description = new TextInputBuilder()
  23.             .setCustomId('description')
  24.             .setLabel("Description")
  25.             .setStyle(TextInputStyle.Long);
  26.  
  27.         const titleRow = new ActionRowBuilder().addComponents(favoriteColorInput);
  28.         const secondActionRow = new ActionRowBuilder().addComponents(hobbiesInput);
  29.  
  30.         modal.addComponents(firstActionRow, secondActionRow);
  31.  
  32.         await interaction.showModal(modal);
  33.     },
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement