Advertisement
Guest User

Code

a guest
Mar 25th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const msg = await message.reply({content: 'Pulsa el botón para empezar a rellenar el formulario.', components: [btnRow]});
  2. const collector = msg.createMessageComponentCollector();
  3. collector.on("collect", async (i) => {
  4.     showModal(modal, {client: client, interaction: i});
  5.     msg.delete();     // I've tried removing this
  6.     message.delete(); // and this line.
  7. });
  8.  
  9. client.on('modalSubmit', async (modal) => {
  10.     if (modal.customId === 'deberes') {
  11.         const dia = modal.getTextInputValue('dia');
  12.         const accion = modal.getTextInputValue('accion');
  13.         const cosas = modal.getTextInputValue('cosas');
  14.  
  15.         modal.reply(`${dia} ... ${accion} ... ${cosas}`);
  16.     }
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement