Moved grantDeveloper role permission into env file.

This commit is contained in:
Chris 2018-06-04 19:16:20 -04:00
parent 369d01bcb9
commit 9d15288d9c
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@
"DISCORD_RULES_ROLE": { "DISCORD_RULES_ROLE": {
"description": "The unique ID for the role that the bot will *remove* when the user accepts the rules." "description": "The unique ID for the role that the bot will *remove* when the user accepts the rules."
}, },
"DISCORD_DEVELOPER_ROLE": true,
"DISCORD_LOGIN_TOKEN": { "DISCORD_LOGIN_TOKEN": {
"description": "The login token of the bot." "description": "The login token of the bot."
}, },

View File

@ -1,6 +1,6 @@
exports.roles = ['Admins', 'Moderators', 'CitraBot']; exports.roles = ['Admins', 'Moderators', 'CitraBot'];
exports.command = function (message) { exports.command = function (message) {
var role = '345247291843805185'; var role = process.env.DISCORD_DEVELOPER_ROLE
message.mentions.users.map((user) => { message.mentions.users.map((user) => {
let member = message.guild.member(user); let member = message.guild.member(user);
let alreadyJoined = member.roles.has(role); let alreadyJoined = member.roles.has(role);