Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const msg = await message.reply({content: 'Pulsa el botón para empezar a rellenar el formulario.', components: [btnRow]});
- const collector = msg.createMessageComponentCollector();
- collector.on("collect", async (i) => {
- showModal(modal, {client: client, interaction: i});
- msg.delete(); // I've tried removing this
- message.delete(); // and this line.
- });
- client.on('modalSubmit', async (modal) => {
- if (modal.customId === 'deberes') {
- const dia = modal.getTextInputValue('dia');
- const accion = modal.getTextInputValue('accion');
- const cosas = modal.getTextInputValue('cosas');
- modal.reply(`${dia} ... ${accion} ... ${cosas}`);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement