mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2025-01-22 06:06:23 -05:00
eee
This commit is contained in:
parent
291325769b
commit
267cbb0db3
12
src/bot.js
12
src/bot.js
@ -228,25 +228,27 @@ client.on("message", async message => {
|
|||||||
var role = "";
|
var role = "";
|
||||||
switch(args[1]) {
|
switch(args[1]) {
|
||||||
case 5:
|
case 5:
|
||||||
var role = message.guild.roles.find(role => role.name === `DEFCON 5`);
|
var role = message.guild.roles.cache.find(role => role.name === `DEFCON 5`);
|
||||||
member.roles.add(role);
|
member.roles.add(role);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
var role = message.guild.roles.find(role => role.name === `DEFCON 4`);
|
var role = message.guild.roles.cache.find(role => role.name === `DEFCON 4`);
|
||||||
member.roles.add(role);
|
member.roles.add(role);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
var role = message.guild.roles.find(role => role.name === `DEFCON 3`);
|
var role = message.guild.roles.cache.find(role => role.name === `DEFCON 3`);
|
||||||
member.roles.add(role);
|
member.roles.add(role);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
var role = message.guild.roles.find(role => role.name === `DEFCON 2`);
|
var role = message.guild.roles.cache.find(role => role.name === `DEFCON 2`);
|
||||||
member.roles.add(role);
|
member.roles.add(role);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
var role = message.guild.roles.find(role => role.name === `DEFCON 1`);
|
var role = message.guild.roles.cache.find(role => role.name === `DEFCON 1`);
|
||||||
member.roles.add(role);
|
member.roles.add(role);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return message.reply(`DEFCON not set is ${args[1]} a number between 1-5?`)
|
||||||
};
|
};
|
||||||
return message.reply(`\n**DEFCON** level set to DEFCON ${args[1]}\nGod Bless their souls`)
|
return message.reply(`\n**DEFCON** level set to DEFCON ${args[1]}\nGod Bless their souls`)
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user