mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2024-12-22 23:46:26 -05:00
perms v2
This commit is contained in:
parent
23e32b90f0
commit
a702361cc5
16
src/index.js
16
src/index.js
@ -72,14 +72,14 @@ client.on("message", async message => {
|
|||||||
if(command === "say") {
|
if(command === "say") {
|
||||||
// makes the bot say something and delete the message. As an example, it's open to anyone to use.
|
// makes the bot say something and delete the message. As an example, it's open to anyone to use.
|
||||||
// To get the "message" itself we join the `args` back into a string with spaces:
|
// To get the "message" itself we join the `args` back into a string with spaces:
|
||||||
const sayMessage = args.join(" ");
|
const sayMessage = args.join(" ");
|
||||||
if(sayMessage.includes('@'))
|
if(sayMessage.includes('@'))
|
||||||
return message.reply("\nStop pinging yourself \nStop pinging yourself");
|
return message.reply("\nStop pinging yourself \nStop pinging yourself");
|
||||||
else if (!message.member.roles.some(r=>["Admin", "Mods","Member of the Order of the b l u e","Botmeister","Ally of the Order"].includes(r.name)) ) {
|
if (!message.member.roles.some(r=>["Admin", "Mods","Member of the Order of the b l u e","Botmeister","Ally of the Order"].includes(r.name)) ) {
|
||||||
// Then we delete the command message (sneaky, right?). The catch just ignores the error with a cute smiley thing.
|
// Then we delete the command message (sneaky, right?). The catch just ignores the error with a cute smiley thing.
|
||||||
message.delete().catch(O_o=>{});
|
message.delete().catch(O_o=>{});
|
||||||
// And we get the bot to say the thing:
|
// And we get the bot to say the thing:
|
||||||
return message.channel.send(sayMessage);
|
return message.channel.send(sayMessage);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return message.channel.send("Im sorry but we cant have nice things...")
|
return message.channel.send("Im sorry but we cant have nice things...")
|
||||||
|
Loading…
Reference in New Issue
Block a user