mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2025-01-31 02:26:58 -05:00
add switch
This commit is contained in:
parent
fcbdc3aa80
commit
0a00917ba2
30
src/index.js
30
src/index.js
@ -222,11 +222,33 @@ client.on("message", async message => {
|
|||||||
if(!message.member.roles.some(r=>["Admin","Member of the Order of the b l u e","Botmeister"].includes(r.name)) )
|
if(!message.member.roles.some(r=>["Admin","Member of the Order of the b l u e","Botmeister"].includes(r.name)) )
|
||||||
return message.reply("Sorry, you don't have permissions to use this!");
|
return message.reply("Sorry, you don't have permissions to use this!");
|
||||||
else {
|
else {
|
||||||
let con = args[1]
|
|
||||||
let member = message.mentions.members.first();
|
let member = message.mentions.members.first();
|
||||||
let role = message.guild.roles.find(role => role.name === `DEFCON ${con}`);
|
let role = 1;
|
||||||
member.addRole(role)
|
switch(args[1]) {
|
||||||
client.channels.get("680243388695445587").send(`${member} has had their **DEFCON** level set to ${con} `)
|
case 5:
|
||||||
|
role = message.guild.roles.find(role => role.name === `DEFCON 5`);
|
||||||
|
member.addRole(role);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
role = message.guild.roles.find(role => role.name === `DEFCON 4`);
|
||||||
|
member.addRole(role);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
role = message.guild.roles.find(role => role.name === `DEFCON 3`);
|
||||||
|
member.addRole(role);
|
||||||
|
case 2:
|
||||||
|
role = message.guild.roles.find(role => role.name === `DEFCON 2`);
|
||||||
|
member.addRole(role);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
role = message.guild.roles.find(role => role.name === `DEFCON 1`);
|
||||||
|
member.addRole(role);
|
||||||
|
break;
|
||||||
|
message.reply("Defcon level not found please use 1-5");
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
client.channels.get("680243388695445587").send(`${member} has had their **DEFCON** level set to ${role} `)
|
||||||
return message.reply("\n**DEFCON** level set!\nGod Bless their souls")
|
return message.reply("\n**DEFCON** level set!\nGod Bless their souls")
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user