Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Way to delete guild-only (or global) slash commands? #109

Answered by kvsxxx
brotherelric asked this question in Q&A
Discussion options

You must be logged in to vote

in the current version there is no real way to delete commands manually other than use the delete_unused keyword in the UI instance initialization and remove the command

ui = UI(slash_options={"delete_unused": True}) 

This will delete all commands in the api that are not registered in the code

For example you have 3 commands, command A, B, C

@ui.slash.command("A")
async def A(ctx):
    ...
@ui.slash.command("B")
async def B(ctx):
    ...
@ui.slash.command("C")
async def C(ctx):
    ...

And you want to have command B deleted, you just remove the "declaration" for command B

@ui.slash.command("A")
async def A(ctx):
    ...

# command B will be deleted when commands are synced

@ui.slash.command

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@brotherelric
Comment options

Answer selected by brotherelric
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants