#how to delete slash commands

1 messages · Page 1 of 1 (latest)

crystal canyon
#

hey I'm trying to delete slash commands too

trail fiber
#

if you guys used the deployment script from the guide, you can delete all slash commands--- like that yes

crystal canyon
#

I'm registering them under client.api but I can't even find docs on that and I wrote that code a while ago

trail fiber
#

actually to be more specific, that line of code will delete all global commands

crystal canyon
#

should .application be a property of Client? I can't see it in the docs: https://discord.js.org/#/docs/discord.js/v12/class/Client

crystal canyon
#

because I'm still on v12 and haven't upgraded yet

trail fiber
#

well v12 didn't have native support for slash commands

#

can't really help you there

crystal canyon
#

well I'm using them in v12 somehow

trail fiber
#

yeah, there was a hacky way to get them in

crystal canyon
#

maybe it was beta support and I'm accessing them under an experimental now deprecated method...

#

yeah I'm doing client.api.applications(client.user.id).guilds(guildId).commands.post()

trail fiber
#

it wasn't beta support
discord.js allows you to do things raw if you really want to, so people decided to do that for slash commands since v13 took a while to come out

#

we can't help you here if you intend to continue using v12

crystal canyon
#

ok that's fine but in v13 is client.api still a thing? I'm assuming to do something with the raw Discord API? I can't find that in the docs for Client properties either: https://discord.js.org/#/docs/discord.js/v13/class/Client

trail fiber
#

well in v13, client.application is documented

barren novaBOT
crystal canyon
#

ah ok so I can go there directly instead of using .api.applications

#

thanks for the help!