Command-fix/commands/testing.disabled.js

16 lines
499 B
JavaScript
Raw Normal View History

2016-12-08 04:52:37 +01:00
var app = require('../app.js');
var logger = require('../logging.js');
exports.command = function(message) {
2016-12-31 06:48:39 +01:00
var role = '254036987508424714';
var alreadyJoined = app.guild.roles.get(role).members.find(member => member.id == message.member.id);
2016-12-08 04:52:37 +01:00
if (alreadyJoined != null) {
2016-12-31 06:48:39 +01:00
message.member.removeRole(role);
2016-12-08 04:52:37 +01:00
message.reply('You are no longer part of the testing group.');
} else {
2016-12-31 06:48:39 +01:00
message.member.addRole(role);
2016-12-08 04:52:37 +01:00
message.reply('You are now part of the testing group.');
}
}