javadiscord-jda

Delete current CommandData JDA


So I'm making a Slash Command Library for JDA, and for some reason, I can't find any documentation on removing a slash command from a guild. Let me explain.

So I use guild.upsertCommand(commandData); to register the command. But what I want to know is if the guild has a command with that name, I want to delete that command from the guild, so that the old one and the new one aren't mixed up.

Cheers, Agent


Solution

  • Never mind, I just realized after looking through the api you can iterate through the commands and get the one you want to delete it.