-
Notifications
You must be signed in to change notification settings - Fork 351
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
First pull/push #169
First pull/push #169
Conversation
Really needs a gitignore file
… going to have the same id in any other guild)
On branch role-perm Changes to be committed: modified: plugins/Admin/admin.js
So many commits just to get back to original lol. |
fixed issue with args[] missing split from arg. fixed issue with role var in .find clashed with role var with role.id (renamed to roleid) fixed users own role being removed instead of mentioned user.
changed != to !==
Changes to be committed: modified: plugins/Admin/admin.js Made statements easier to read and understand, slight check of if msg came from a server or not though if statement, should add some sort of error message that is based on if the command is ran in a dm or if the sender doesn't have guild permission of ROLE
Tested new check of permission and works perfectly, typically no one would give manage roles perm unless they are an admin or higher. |
var args = arg.split(" "); | ||
var user, role; | ||
if(msg.member.hasPermission("MANAGE_ROLES")){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to check if the bot has MANAGE_ROLES
so that it can fail gracefully if it doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could also do another try catch for it as well, or a quick change to add & to the if statement
Changed admin.js to have userRole for request #70