Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
Can you technically add 'Button' in 'Modal' as 'Discord.js'?

Reference this code : https://discordjs.guide/interactions/modals.html#building-and-responding-with-modals

try todo :

    const modal = new Modal()
      .setCustomId('Vote')
      .setTitle('Vote TItle');

    const favoriteColorInput = new TextInputComponent()
      .setCustomId('favoriteColorInput')
      .setLabel("Vote Title")
      .setStyle('SHORT');

    const hobbiesInput = new TextInputComponent()
      .setCustomId('hobbiesInput')
      .setLabel("Value")
      .setStyle('SHORT');

    const addButton = new MessageButton()
      .setCustomId('addButton')
      .setLabel('ADD')
      .setStyle('SUCCESS');

    const firstActionRow = new MessageActionRow().addComponents(favoriteColorInput);
    const secondActionRow = new MessageActionRow().addComponents(hobbiesInput);
    const addButtonActionRow = new MessageActionRow().addComponents(addButton);

    modal.addComponents(firstActionRow, secondActionRow, addButtonActionRow);
    await interaction.showModal(modal);

prediction:

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In modals for now, you have only two buttons submit and cancel that are built-in the modal, so you cannot add more buttons to it.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!