Advertisement
Radicatte

Untitled

Jun 28th, 2022
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { Client, MessageActionRow, Modal, TextInputComponent, showModal } = require('discord.js');
  2.  
  3. module.exports = async (client) => {
  4.  
  5.     client.on("interactionCreate", async (interaction) => {
  6.         if (interaction.isButton()) {
  7.             if (interaction.customId = 'shanklyButton') {
  8.                 const modal = new modal()
  9.                     .setCustomId('shanklyModal')
  10.                     .setTitle('Sugiere algo')
  11.                     .addComponents([
  12.                         new TextInputComponent()
  13.                             .setCustomId('shanklyinputModal')
  14.                             .setLabel('Escribe el error/bug a reportar')
  15.                             .setStyle('LONG')
  16.                             .setMinLength(1)
  17.                             .setMaxLength(4000)
  18.                             .setPlaceholder('ej: el bot esta enviando mensajes duplicados')
  19.                             .setRequired(true),
  20.                     ])
  21.             }
  22.         }
  23.         await interaction.showModal(shanklyModal, { client, interaction })
  24.     })
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement