Allows for Baserole to be self-assigned

This commit is contained in:
Ralph 2018-12-09 12:53:04 -05:00 committed by GitHub
parent d59bba201f
commit dbc1e5be14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ exports.addrole = {
if (suffix) { if (suffix) {
//suffix = suffix.toLowerCase(); //suffix = suffix.toLowerCase();
// Checks if the role mentioned in the message is in the allowed roles listed in the wunderbot config. // Checks if the role mentioned in the message is in the allowed roles listed in the wunderbot config.
if (rolelist.allowedroles.includes(suffix)) { if (rolelist.allowedroles.includes(suffix) || (baserole == suffix) {
// Checks if the role even exists in the discord server // Checks if the role even exists in the discord server
if (newrole !== null) { if (newrole !== null) {
// Checks if the member has the role that they are trying to add // Checks if the member has the role that they are trying to add