Temporary disable slash_command in py-cord

16 views Asked by At

I have bot code which I use for multiple projects. For some projects I want to disable a slash_command completely. I found no way to disable a slash_command completely .. only handle this with default_permission. But here i only can disable it for non admins for example.

Code example:

@bot.event
async def on_ready():
    xxxx.start()
    yyyy.start()
    zzzz.start()

@bot.slash_command(name="commandx")
async def commandx(update):
[..code..]

@bot.slash_command(name="commandy")
async def commandy(update):
[..code..]

I want to disable commandx but keep commandy.

0

There are 0 answers