Way to delete guild-only (or global) slash commands? #109
-
Title. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
in the current version there is no real way to delete commands manually other than use the 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 @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 @ui.slash.command("A")
async def A(ctx):
...
# command B will be deleted when commands are synced
@ui.slash.command("C")
async def C(ctx):
...
in the preview version it's easy, you use @ui.slash.command(...)
async def my_command(...):
...
await my_command.delete() Or you use the method mentioned above (with |
Beta Was this translation helpful? Give feedback.
-
Yaa !! Actually I was thinking that if we could design a program which helps us to delete msg manually with out using of that old version codes as delete_unsend ...so it might be quite easy to use instead of the old technique..🙄 |
Beta Was this translation helpful? Give feedback.
in the current version there is no real way to delete commands manually other than use the
delete_unused
keyword in theUI
instance initialization and remove the commandThis will delete all commands in the api that are not registered in the code
For example you have 3 commands, command
A
,B
,C
And you want to have command
B
deleted, you just remove the "declaration" for commandB