I try to gray out some slash commands that only someone with the right permissions can use. I found out that you can gray them out for everyone if you set default_permission = False. Then I found out that theres a permissions attribute that you can provide. But I just can't get it working.
I tried using it like this permissions = [discord.CommandPermission(id=8589934592, type=3)] But with this the command is disabled for everyone.
My complete command looks like this:
@slash_command(name='testcommand', description='its just a test', guild_ids = [831161440705839124], permissions = [discord.CommandPermission(id=8589934592, type=3)])
async def testcommand(self, ctx, channel : Option(discord.TextChannel, "a normal test", required = True)):
print("Test passed!")
If anyone knows how I am supposed to use the permissions attribute or another way to disable slash commands that require specific permissions, please let me know!
I don't know if it changes anything but I'm using Pycord 2.0.0b5