VoxelBotUtils icon indicating copy to clipboard operation
VoxelBotUtils copied to clipboard

Implement permission handling for slash commands

Open 4Kaylum opened this issue 3 years ago • 4 comments

I'm entirely sure there's some way I can parse the checks system to allow this, but from there I think I can make up some permission handles on the slashies.

4Kaylum avatar Apr 30 '21 18:04 4Kaylum

Since opening this PR I've had a look at how the permissions for slash commands are actually handled and I genuinely can't think of a good system for how I would implement permissions because they're so weird.

4Kaylum avatar May 07 '21 13:05 4Kaylum

https://discord.com/developers/docs/interactions/slash-commands#applicationcommandpermissions

You can add a permission for a given user or role to run a command, but this isn't something you can do for a permission check, for example. I can't say "any user with manage guild", I'd need to subscribe to role update events in that guild and then intermittently send updated permission payloads to Discord.

4Kaylum avatar May 07 '21 13:05 4Kaylum

Nothing has happened with this for a while, so I'm just putting this out here: Discord are working on better permission systems for slash commands. While still not knowing how to handle slashies with permissions here, I'll wait for their update and hope it adds support for what we have inbuilt already.

4Kaylum avatar Aug 10 '21 12:08 4Kaylum

https://msciotti.notion.site/msciotti/Command-Permissions-V2-4d113cb49090409f998f3bd80a06c3bd

4Kaylum avatar Sep 21 '21 21:09 4Kaylum