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

115
Views
Deleting all Slash Commands

how to delete all slash commands using discord.js? I'm using 13.5.0 version

bot.on('interactionCreate', interaction => {
          if (!interaction.isCommand()) return;
          bot.api.applications(bot.user.id).commands(interaction.commandId).delete();
});

I tried to do this, but it's just gives me error: Uncaught DiscordAPIError: Unknown application command

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

0

Setting slash commands takes up to an hour if done globally, so use the second param, guildid, to delete the slash commands of your bot for a testing server when testing. remove the second param when you want the slash commands to appear globally.

The code would be like so:

bot.application.commands.set([], <GuildId>);
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!