mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2025-02-21 05:07:16 -05:00
not actaully doing a release yet cause i can
This commit is contained in:
parent
cc72efadce
commit
be11882ba4
2
npm-shrinkwrap.json
generated
2
npm-shrinkwrap.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@technicolor-creamsicle/osselbot",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
18
src/index.js
18
src/index.js
@ -113,6 +113,24 @@ client.on("message", async message => {
|
||||
};
|
||||
return;
|
||||
};
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
if(command === "say") {
|
||||
// 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:
|
||||
const sayMessage = args.join(" ");
|
||||
if (message.member.roles.cache.some(r=>["Admin","Mods","Member of the Order","Botmeister","Ally of the Order","say"].includes(r.name)) ){
|
||||
if(sayMessage.includes('@')) {
|
||||
return message.reply("\nStop pinging yourself \nStop pinging yourself");
|
||||
};
|
||||
// Then we delete the command message (sneaky, right?). The catch just ignores the error with a cute smiley thing.
|
||||
message.delete().catch(O_o=>{});
|
||||
// And we get the bot to say the thing:
|
||||
return message.channel.send(sayMessage);
|
||||
};
|
||||
else {
|
||||
return message.channel.send("Im sorry but we cant have nice things...")
|
||||
};
|
||||
};
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////DEFCON//////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user