LengoLabs / qbot

Qbot is an advanced, easy to setup, free, and unbranded Discord-Roblox ranking bot. If at any time during setting it up you need assistance, you can join the support server.
https://discord.gg/J47m7t4
MIT License
77 stars 138 forks source link

Add multi-role support for permissions #97

Closed sv-du closed 2 years ago

sv-du commented 2 years ago

This PR, as the title suggests, allows for multiple roles to be added as required roles for the permission system

I did test this with the permission permissions.all and some commands, like shout via permissions.shout

If there are any bugs that I didn't catch while testing, please do comment and I'll try to fix them

yogurtsyum commented 2 years ago

I think I would rather use the current system and just map through permissions in the command files.

sv-du commented 2 years ago

What do you mean by this? If you mean like adding code to iterate through permissions in every command file, won't it just be more annoying to make new commands (and plugins for plugin developers) in the future, knowing that it would be required to have to copy-n-paste the code? I tried to make this implementation be global, but simple, thus why I only changed the checkPermissions function

yogurtsyum commented 2 years ago

We can use the checkPermissions function I guess.

yogurtsyum commented 2 years ago

I'm actually going to rewrite this because it doesn't use arrays and the code doesn't really match our styling.

sv-du commented 2 years ago

Oh, alright

yogurtsyum commented 2 years ago

Thanks for the PR anyways though.