ughgjadl[n

This commit is contained in:
Alex Brow 2020-02-19 20:56:04 -05:00
parent a702361cc5
commit 756496f6f8
No known key found for this signature in database
GPG Key ID: F48926893F475C25

View File

@ -73,9 +73,10 @@ client.on("message", async message => {
// 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 (!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(sayMessage.includes('@')) {
return message.reply("\nStop pinging yourself \nStop pinging yourself"); return message.reply("\nStop pinging yourself \nStop pinging yourself");
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: