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

133
Views
How can I get the custom ID from interactionCreate for buttons?

Is it possible to get the custom ID from interactionCreate for buttons?

client.on("interactionCreate", interaction => {
    if (interaction.isButton()) {
        // I want to get the CustomId of the button that was pressed here.
    }
})
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

It can be changed to this and it can be obtained

client.on("interactionCreate", interaction => {
    if (interaction.isButton()) {
        const btn_id = interaction.customId;
        //btn_id = your button id
    }
})
about 4 years ago · Juan Pablo Isaza Report

0

By using .customId

client.on("interactionCreate", interaction => {
    if (interaction.isButton()) {
        // interaction.customId;
    }
})

ButtonInteraction#customId

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!