30 Commits

Author SHA1 Message Date
1b7dcedca2 Update index.js 2020-05-27 11:07:17 -05:00
cedf3c6d72 Update index.js 2020-05-26 19:23:04 -05:00
4e334c1459 Update index.js 2020-05-26 19:04:50 -05:00
dad83d5001 the magic of repl 2020-05-26 22:26:31 +00:00
8a1bc2137b egg 2020-05-26 17:09:56 -05:00
c6fb55a097 egg 2020-05-25 20:27:26 -05:00
a4e30196be no more war 2020-05-25 20:24:23 -05:00
Alex
d1749c7760 Merge pull request #4 from Technicolor-creamsicle/dev
Dev
2020-05-25 20:20:48 -05:00
Alex
5a42a3e11a Merge branch 'master' into dev 2020-05-25 20:20:39 -05:00
c15ddaa8ed fuck tgis 2020-05-25 20:10:21 -05:00
275493b0f5 it works 2020-05-26 01:09:55 +00:00
3a84baa944 ah 2020-05-26 00:04:04 +00:00
4a7e7ea431 erghjnm 2020-05-25 18:50:53 -05:00
b28ed796d6 hjgcljcgultd 2020-05-25 18:31:53 -05:00
9239d10a6f asdfghjk 2020-05-25 18:31:10 -05:00
abb41e182e fuck you gamma 2020-05-25 18:17:55 -05:00
02f9f7e643 look at this 2020-05-25 18:06:00 -05:00
fdb14602c3 ah 2020-05-25 17:32:35 -05:00
007e46b135 Take a look if you wish 2020-05-25 16:23:31 -05:00
b75e153a1a a 2020-05-25 13:25:58 -05:00
174737a4a4 ah 2020-05-25 12:41:39 -05:00
76d24311f0 thats why that brke 2020-05-24 14:07:29 -05:00
95e85be5de ag 2020-05-24 14:05:56 -05:00
3bb8fc6d76 fuck google api 2020-05-24 01:47:11 -05:00
2aa12d057c ah
this sucks
2020-05-24 00:56:39 -05:00
Alex Brow
816118633d aaaa 2020-05-24 00:26:36 -05:00
c8e2828043 more 2.1.0 2020-05-18 14:22:09 -05:00
167d69e564 2.1.0 Because versioning is wack 2020-05-18 14:20:50 -05:00
b155c84cfc Merge branch 'master' of https://github.com/Technicolor-creamsicle/Osselbot 2020-05-18 13:58:00 -05:00
2b98f98b1c 2.0.4 FINAL 2020-05-18 13:51:01 -05:00
8 changed files with 196 additions and 149 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
node_modules/ node_modules/
.DS_Store

2
.replit Normal file
View File

@@ -0,0 +1,2 @@
language = "nodejs"
run = "npm start"

246
npm-shrinkwrap.json generated
View File

@@ -1,125 +1,125 @@
{ {
"name": "@technicolor-creamsicle/osselbot", "name": "@technicolor-creamsicle/osselbot",
"version": "2.0.4", "version": "2.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@discordjs/collection": { "@discordjs/collection": {
"version": "0.1.5", "version": "0.1.5",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.5.tgz", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.5.tgz",
"integrity": "sha512-CU1q0UXQUpFNzNB7gufgoisDHP7n+T3tkqTsp3MNUkVJ5+hS3BCvME8uCXAUFlz+6T2FbTCu75A+yQ7HMKqRKw==" "integrity": "sha512-CU1q0UXQUpFNzNB7gufgoisDHP7n+T3tkqTsp3MNUkVJ5+hS3BCvME8uCXAUFlz+6T2FbTCu75A+yQ7HMKqRKw=="
}, },
"@discordjs/form-data": { "@discordjs/form-data": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"requires": { "requires": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
"combined-stream": "^1.0.8", "combined-stream": "^1.0.8",
"mime-types": "^2.1.12" "mime-types": "^2.1.12"
} }
}, },
"abort-controller": { "abort-controller": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"requires": { "requires": {
"event-target-shim": "^5.0.0" "event-target-shim": "^5.0.0"
} }
}, },
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
}, },
"combined-stream": { "combined-stream": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": { "requires": {
"delayed-stream": "~1.0.0" "delayed-stream": "~1.0.0"
} }
}, },
"delayed-stream": { "delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
}, },
"discord.js": { "discord.js": {
"version": "12.2.0", "version": "12.2.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.2.0.tgz", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.2.0.tgz",
"integrity": "sha512-Ueb/0SOsxXyqwvwFYFe0msMrGqH1OMqpp2Dpbplnlr4MzcRrFWwsBM9gKNZXPVBHWUKiQkwU8AihXBXIvTTSvg==", "integrity": "sha512-Ueb/0SOsxXyqwvwFYFe0msMrGqH1OMqpp2Dpbplnlr4MzcRrFWwsBM9gKNZXPVBHWUKiQkwU8AihXBXIvTTSvg==",
"requires": { "requires": {
"@discordjs/collection": "^0.1.5", "@discordjs/collection": "^0.1.5",
"@discordjs/form-data": "^3.0.1", "@discordjs/form-data": "^3.0.1",
"abort-controller": "^3.0.0", "abort-controller": "^3.0.0",
"node-fetch": "^2.6.0", "node-fetch": "^2.6.0",
"prism-media": "^1.2.0", "prism-media": "^1.2.0",
"setimmediate": "^1.0.5", "setimmediate": "^1.0.5",
"tweetnacl": "^1.0.3", "tweetnacl": "^1.0.3",
"ws": "^7.2.1" "ws": "^7.2.1"
} }
}, },
"event-target-shim": { "event-target-shim": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
}, },
"mime-db": { "mime-db": {
"version": "1.44.0", "version": "1.44.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
}, },
"mime-types": { "mime-types": {
"version": "2.1.27", "version": "2.1.27",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
"requires": { "requires": {
"mime-db": "1.44.0" "mime-db": "1.44.0"
} }
}, },
"n": { "n": {
"version": "6.5.1", "version": "6.5.1",
"resolved": "https://registry.npmjs.org/n/-/n-6.5.1.tgz", "resolved": "https://registry.npmjs.org/n/-/n-6.5.1.tgz",
"integrity": "sha512-CSDShHuBlYHfS5PR4BxwkZYNrDnc3B7GCRdAhSvnzl681Pd4Y4qOOTWQqjB8Cp6gYOIQI9qJxLK0Q1YI4xO2Kg==" "integrity": "sha512-CSDShHuBlYHfS5PR4BxwkZYNrDnc3B7GCRdAhSvnzl681Pd4Y4qOOTWQqjB8Cp6gYOIQI9qJxLK0Q1YI4xO2Kg=="
}, },
"node-fetch": { "node-fetch": {
"version": "2.6.0", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
}, },
"parse-ms": { "parse-ms": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz",
"integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==" "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA=="
}, },
"pretty-ms": { "pretty-ms": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-6.0.1.tgz", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-6.0.1.tgz",
"integrity": "sha512-ke4njoVmlotekHlHyCZ3wI/c5AMT8peuHs8rKJqekj/oR5G8lND2dVpicFlUz5cbZgE290vvkMuDwfj/OcW1kw==", "integrity": "sha512-ke4njoVmlotekHlHyCZ3wI/c5AMT8peuHs8rKJqekj/oR5G8lND2dVpicFlUz5cbZgE290vvkMuDwfj/OcW1kw==",
"requires": { "requires": {
"parse-ms": "^2.1.0" "parse-ms": "^2.1.0"
} }
}, },
"prism-media": { "prism-media": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.2.tgz", "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.2.tgz",
"integrity": "sha512-I+nkWY212lJ500jLe4tN9tWO7nRiBAVdMv76P9kffZjYhw20raMlW1HSSvS+MLXC9MmbNZCazMrAr+5jEEgTuw==" "integrity": "sha512-I+nkWY212lJ500jLe4tN9tWO7nRiBAVdMv76P9kffZjYhw20raMlW1HSSvS+MLXC9MmbNZCazMrAr+5jEEgTuw=="
}, },
"setimmediate": { "setimmediate": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
}, },
"tweetnacl": { "tweetnacl": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
}, },
"ws": { "ws": {
"version": "7.3.0", "version": "7.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz",
"integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==" "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w=="
} }
} }
} }

View File

@@ -1,5 +1,2 @@
const { ShardingManager } = require('discord.js');
const manager = new ShardingManager('./bot.js', { token: 'Njc4MDkzNjY4NzcwNTEyOTE3.XkdyyA.6n4wvPmzOw-fwuysEoTPU8Cv2x0' });
manager.spawn(); DEPRICATED
manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));

View File

@@ -1,6 +1,6 @@
{ {
"name": "@technicolor-creamsicle/osselbot", "name": "@technicolor-creamsicle/osselbot",
"version": "2.0.4", "version": "2.1.0",
"description": "A discord bot on Discord.js", "description": "A discord bot on Discord.js",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
@@ -20,7 +20,7 @@
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {
"test": "node ./src/index --TEST", "test": "node ./src/index --TEST",
"start": "npm install; node ./src/index.js" "start": "node ./src/index.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

1
quotes.json Normal file
View File

@@ -0,0 +1 @@
{"quotes":["you can add quotes by running ?quote add <person> Quote goes here","techt parm arm zarm","<@!258325046869622785> I HATE JS."]}

View File

@@ -1,4 +1,4 @@
{ {
"token" : "Njc4MDkzNjY4NzcwNTEyOTE3.Xr7SNw.XS_D_dEJ7hX6N5Rmnfr_OQpfznU", "token" : "Njc4MDkzNjY4NzcwNTEyOTE3.Xr7SNw.XS_D_dEJ7hX6N5Rmnfr_OQpfznU",
"prefix" : ";" "prefix" : "?"
} }

View File

@@ -2,29 +2,50 @@
// Load up the libraries // Load up the libraries
const Discord = require("discord.js"); const Discord = require("discord.js");
const prettyMilliseconds = require('pretty-ms'); const prettyMilliseconds = require('pretty-ms');
const fs = require('fs');
const homedir = require('os').homedir;
const info = require("../package.json")
//importing files
const config = require("./config.json"); const config = require("./config.json");
// This is the client // This is making clients
const client = new Discord.Client(); const client = new Discord.Client();
function activity() {
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' });
};
client.on("ready", () => { client.on("ready", () => {
// This event will run if the bot starts, and logs in, successfully. // This event will run if the bot starts, and logs in, successfully.
console.log(`Bot has started, with ${client.users.cache.size} users, in ${client.channels.cache.size} channels of ${client.guilds.cache.size} guilds.`); console.log(`Bot has started, with ${client.users.cache.size} users, in ${client.channels.cache.size} channels of ${client.guilds.cache.size} guilds.`);
// Example of changing the bot's playing game to something useful. `client.user` is what the // Example of changing the bot's playing game to something useful. `client.user` is what the
// docs refer to as the "ClientUser". // docs refer to as the "ClientUser".
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' }); activity();
}); });
//Updates people count //Updates people count
client.on('guildMemberAdd', member => { client.on('guildMemberAdd', member => {
console.log(`New member joined: ${member.name} (id: ${member.id}).`); console.log(`New member joined: ${member.name} (id: ${member.id}).`);
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' }); activity();
}); });
client.on('guildMemberRemove', member => { client.on('guildMemberRemove', member => {
console.log(` member left: ${member.name} (id: ${member.id}).`); console.log(` member left: ${member.name} (id: ${member.id}).`);
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' }); activity();
}); });
setInterval(activity, 300000);
////// ACTUAL MESSAGE PROCESSING ////// ACTUAL MESSAGE PROCESSING
client.on("message", async message => { client.on("message", async message => {
//stops bots from activating the Osselbot //stops bots from activating the Osselbot
//Message processing //Message processing
if(message.content.toLowerCase().includes('nigg',"niglet","negro","fag","f4g","n1gg","gg3r")) {
message.delete();
return message.reply(`Listen here cum-sock we dont appeciate that here ${message.member}. If you gonna be like that you may just well end up in the JAR and we all know how that ends...`)
}
if(message.author.bot) return; if(message.author.bot) return;
if(message.content.indexOf(config.prefix) !== 0) return; if(message.content.indexOf(config.prefix) !== 0) return;
// Here we separate our "command" name, and our "arguments" for the command. // Here we separate our "command" name, and our "arguments" for the command.
@@ -54,13 +75,14 @@ client.on("message", async message => {
if (command === "stats") { if (command === "stats") {
let embed = new Discord.MessageEmbed() let embed = new Discord.MessageEmbed()
.setTitle('Stats') .setTitle('Stats')
.setAuthor("Osselbot", "https://cdn.discordapp.com/attachments/597814181084921866/711843993914310656/animated-beach-balls-29.gif")
.setColor(0x195080) .setColor(0x195080)
.setDescription(`\ .setDescription(`\
**Stats for 0SSELB0T** \n \ **Stats for 0SSELB0T** \n \
**Uptime:** ${prettyMilliseconds(client.uptime)} \n \ **Uptime:** ${prettyMilliseconds(client.uptime)} \n \
**Started at:** ${client.readyAt} \n \ **Started at:** ${client.readyAt} \n \
**People:** ${client.users.cache.size}\ **People:** ${client.users.cache.size}`)
`); .setFooter(`osselbot v${info.version} run version for full info`);
return message.channel.send(embed); return message.channel.send(embed);
}; };
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@@ -93,7 +115,7 @@ client.on("message", async message => {
}; };
if(command === "squad") { if(command === "squad") {
min = Math.ceil(0); min = Math.ceil(0);
max = Math.floor(11); max = Math.floor(11);
let rate = Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive let rate = Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive
return message.reply(`The squad rates this ${rate} out of 10`); return message.reply(`The squad rates this ${rate} out of 10`);
@@ -118,31 +140,55 @@ 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 (message.member.roles.cache.some(r=>["Admin","Mods","Member of the Order","Botmeister","Ally of the Order","say"].includes(r.name)) ){ 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. // 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 {
return message.channel.send("Im sorry but we cant have nice things...")
};
}; };
////////////////////////////////////////////////////////////////////////////////
if(command === "quote") {
let quotes = require(`${homedir}/quotes.json`);
var quoteadd = "";
var selector;
try{
selector = args[0].toLowerCase();
} catch (err) {
var number = quotes.quotes.length + 1;
let quotesend = Math.floor(Math.random() * (number - 0) + 0);
return message.channel.send(`${quotes.quotes[quotesend]}`);
};
if(selector === "add") {
if (!(message.member.roles.cache.some(r => ["Admin","Mods","Member of the Order","Botmeister","Ally of the Order","say"].includes(r.name)))) return message.reply("Ask someone with the quote role to add that.")
args.shift();
//This does logic to make it from an array to a nice string.
quoteadd = args.join(' ');
quotes.quotes.push(quoteadd)
fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes, null, 2), (err) => {
if (err) return message.reply("Something went wrong");``
client.channels.cache.get('712084662033580064').send(`${message.member} has submitted \`${quoteadd}\` to the quote repository`);
return message.reply("Quote added to repository");
});
}
else {
return message.reply("you can add quotes by running `?quote add <person> Quote goes here`");
};
};
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
if (command === "version") { if (command === "version") {
return message.channel.send("``` ________________________________________\n \ return message.channel.send(`\`\`\`\
< @technicolor-creamsicle/osselbot@2.0.4 >\n \ ________________________________________\n \
< @technicolor-creamsicle/osselbot@v${info.version}>\n \
----------------------------------------\n \ ----------------------------------------\n \
\\ ^__^\n \ \\ ^__^\n \
\\ (oo)\\_______\n \ \\ (oo)\\_______\n \
(__)\\ )\\/\\\n \ (__)\\ )\\/\\\n \
||----w |\n \ ||----w |\n \
|| ||\n \ || ||\n \
```") \`\`\``)
} };