Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update help.js #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update help.js #11

wants to merge 3 commits into from

Conversation

rinarchy
Copy link

let permissions = command.permission

Will cause this to always display all commands, regardless of the permissions of the user, irrespective of their actual permissions as both the add command, add currency command + the default module.exports use the key value pair labelled "permissions" not permission. Changing to be

let commandPermissions = command.permissions

resolves this by pulling the correct key/value pair and as such commands will not be shown if the user doesn't have the permissions.

In the module.exports: 

permissions = [],

is defined and by default the permission check uses let permissions = command.permission which is not used in the add or add-economy command. This leads to all commands being shown for all users irrespective of their actual permissions. Changed permissions to commandPermissions to be prevent overlap with existing variable and to be less ambiguous & to function as intended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant