summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlee <alee14498@gmail.com>2018-03-31 20:48:32 -0400
committerAlee <alee14498@gmail.com>2018-03-31 20:48:32 -0400
commitef6ad7fa93b4dfcb8a63e93f6c8cffecaad05ac2 (patch)
treeec316dfa865676f0b8a9435f1c0b0a16e3be85f8
parent3beb0d05f9caeabcef48eb1a182ebf35df5b8460 (diff)
downloadAleeBot-ef6ad7fa93b4dfcb8a63e93f6c8cffecaad05ac2.tar.gz
AleeBot-ef6ad7fa93b4dfcb8a63e93f6c8cffecaad05ac2.tar.bz2
AleeBot-ef6ad7fa93b4dfcb8a63e93f6c8cffecaad05ac2.zip
Justin or trey.... help......
-rw-r--r--bot_discord.js55
-rw-r--r--quotes.json278
2 files changed, 333 insertions, 0 deletions
diff --git a/bot_discord.js b/bot_discord.js
index 0eca625..ed31e9a 100644
--- a/bot_discord.js
+++ b/bot_discord.js
@@ -117,6 +117,61 @@ client.on('message', (msg) => {
console.error(e);
}
}
+
+let QuoteOfTheDay;
+let QuoteOfTheDayExpiry = 0;
+let QuoteOfTheDayStartTime;
+
+ function GetQuoteOfTheDay(quoteNum = -1) {
+ const now = new Date();
+
+ if (QuoteOfTheDayExpiry < now.getTime()) {
+ log('[!] Getting new quote of the day...');
+ log('[!] This quote expires in 1 day.');
+
+ QuoteOfTheDayStartTime = now;
+ QuoteOfTheDayExpiry = now.getTime();
+ QuoteOfTheDayExpiry += 86400000;
+
+ QuoteOfTheDay = new Discord.RichEmbed();
+
+ let quo = require('./quotes.json').quotes
+
+ if (quoteNum == -1) {
+ quoteNum = Math.floor(Math.random() * 1000) % quo.length;
+ quo=quo[quoteNum];
+ }
+
+ const author = quo.author;
+ const authorImage = quo.authorImage;
+ const quote = quo.quote;
+ const year = quo.year;
+ const url = quo.url;
+
+ QuoteOfTheDay.setAuthor(author, authorImage);
+ QuoteOfTheDay.setColor('#939d45');
+ QuoteOfTheDay.setDescription(quote);
+ QuoteOfTheDay.setFooter('- ' + year);
+ QuoteOfTheDay.setURL(url);
+ } else {
+ log('[!] No need for new quote of the day');
+ }
+
+
+ return QuoteOfTheDay;
+ }
+
+ if (message.content === 'ab:qotd') {
+ const quoteofday = GetQuoteOfTheDay();
+ message.channel.send('Here\'s the quote of the day (as of ' + QuoteOfTheDayStartTime.toUTCString() + ')');
+ message.channel.sendEmbed(quoteofday);
+ } else if (command === 'ab:forcequote') {
+ message.delete();
+ QuoteOfTheDayExpiry = 0;
+ const quoteofday = GetQuoteOfTheDay();
+ message.channel.send('New quote of the day!');
+ message.channel.sendEmbed(quoteofday);
+ }
});
process.on('unhandledRejection', function(err, p) {
diff --git a/quotes.json b/quotes.json
new file mode 100644
index 0000000..856d3cf
--- /dev/null
+++ b/quotes.json
@@ -0,0 +1,278 @@
+{
+ "quotes" :[
+ {
+ "author": "Victor Tran",
+ "authorImage": "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote": "A letter says a whole video!",
+ "year": "2017",
+ "url": "https://cdn.discordapp.com/attachments/278874966542385152/280566273992032258/Screenshot_20170213-160944.png"
+ },
+ {
+ "author" : "Prince Hamlet: William Shakespeare",
+ "authorImage" : "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Shakespeare.jpg/468px-Shakespeare.jpg",
+ "quote" : "To be, or not to be, that is the question",
+ "year" : "circa. 1600",
+ "url" : "https://en.wikipedia.org/wiki/To_be,_or_not_to_be"
+ },
+ {
+ "author" : "Diana Adams / Mitsubishi Mirage",
+ "authorImage" : "https://yt3.ggpht.com/-tQLg1M-3org/AAAAAAAAAAI/AAAAAAAAAAA/-kkOvupMHXQ/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "Dialing 000...\nNOOO!!!",
+ "year" : "2017",
+ "url" : "https://youtu.be/jDy57c7Y-4A?t:11m52s"
+ },
+ {
+ "author" : "Diana Adams / Mitsubishi Mirage",
+ "authorImage" : "https://yt3.ggpht.com/-tQLg1M-3org/AAAAAAAAAAI/AAAAAAAAAAA/-kkOvupMHXQ/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "You'd have a crash by now!\nPardon?",
+ "year" : "2017",
+ "url" : "https://youtu.be/jDy57c7Y-4A?t:15m5s"
+ },
+ {
+ "author" : "Ivoponop Pena",
+ "authorImage" : "https://yt3.ggpht.com/-hZJxXIFsfB8/AAAAAAAAAAI/AAAAAAAAAAA/c_mjVjQWvTw/s48-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "i buy tablets for the bubble plastic",
+ "year" : "2016",
+ "url" : "https://www.youtube.com/watch?v:AqFDn0TxwH4"
+ },
+ {
+ "author" : "The Mill on the Floss: George Eliot",
+ "authorImage" : "https://upload.wikimedia.org/wikipedia/commons/8/81/George_Eliot_at_30_by_François_D%27Albert_Durade.jpg",
+ "quote" : "Don't judge a book by its cover",
+ "year" : "1860",
+ "url" : "https://en.wikipedia.org/wiki/Don't_judge_a_book_by_its_cover"
+ },
+ {
+ "author" : "tostoday",
+ "authorImage" : "https://yt3.ggpht.com/-gNRclMiHzN4/AAAAAAAAAAI/AAAAAAAAAAA/BNEDEUakd4A/s48-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "I don't know why but Visopsys sounds like a medical condition",
+ "year" : "circa. 2015",
+ "url" : "https://www.youtube.com/watch?v:5T-vEZeY2v0"
+ },
+ {
+ "author" : "Diana Adams",
+ "authorImage" : "https://yt3.ggpht.com/-tQLg1M-3org/AAAAAAAAAAI/AAAAAAAAAAA/-kkOvupMHXQ/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "4 × 1 000 000!? 4 000 000! It's not that hard...",
+ "year" : "2014",
+ "url" : "https://youtu.be/5T-vEZeY2v0?t:9m28s"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "Yes! I'm not *just* a blue happy face!",
+ "year" : "2016",
+ "url" : "https://youtu.be/2E21oad5pWQ"
+ },
+ {
+ "author" : "ItsDeckyah",
+ "authorImage" : "https://yt3.ggpht.com/-t70ZI-25A1k/AAAAAAAAAAI/AAAAAAAAAAA/uGrVakleFIM/s48-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "Always remember, don't let those who are bullying you ruin your life, they are out to do just that. And that's probably all they'll do their whole lives",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Mighty_Eagle073",
+ "authorImage" : "https://yt3.ggpht.com/-Q5IvX3eEGl8/AAAAAAAAAAI/AAAAAAAAAAA/LspLd8v-PR8/s100-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "Spamming : Damning",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Nibble",
+ "authorImage" : "https://yt3.ggpht.com/-SUPNlJ8a7qA/AAAAAAAAAAI/AAAAAAAAAAA/R_I4z7057_w/s100-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "AUTO CORRECF!!!",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "@Derpy ♀ For your own fucking good, learn what political correctness is.",
+ "year" : "2017",
+ "url" : "https://cdn.discordapp.com/attachments/371830028381454337/372263065472729088/2017-10-24_01.58.19.png"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "But couldn't you at least put the mounted disks on the dick or on Dinder?\nDOCK",
+ "year" : "2017",
+ "url" : "https://www.example.com"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "Just happened one gay?\nDAY\nOH BOY\nI BLAME SWIPE TYPING",
+ "year" : "2017",
+ "url" : "https://www.example.com"
+ },
+ {
+ "author" : "Alee",
+ "authorImage" : "https://cdn.discordapp.com/avatars/242775871059001344/b8a995d836bbb8529ae35dc12c2289de.png?size:2048",
+ "quote" : "IS THERE A GOOOOOGALIE HERE!!!!",
+ "year" : "2014",
+ "url" : "https://youtu.be/Ap6fUlMx90A?t:2m30s"
+ },
+ {
+ "author" : "143malliw",
+ "authorImage" : "https://yt3.ggpht.com/-SUPNlJ8a7qA/AAAAAAAAAAI/AAAAAAAAAAA/R_I4z7057_w/s100-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "but i can't write a quote, for I am the quote",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "AstralMod",
+ "authorImage" : "https://cdn.discordapp.com/avatars/282048599574052864/56d2d99bf763df5a05f5d157108edbdc.png?size:2048",
+ "quote" : "Welcome to the weekly chat chat!",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "AstralPhaser",
+ "authorImage" : "https://cdn.discordapp.com/avatars/230480971084988417/32f46a9671c6ceedc54b369ea73be178.png?size:2048",
+ "quote" : "Ok the shrimp is now on the barbie",
+ "year" : "2017",
+ "url" : "https://media.discordapp.net/attachments/277922530973581312/355882401546764289/d300-123-6379-orton-wp.png"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : ":joy: It's Cameron's Birthday!\nJoy!!!11!!111!!!!",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "RogueAI",
+ "authorImage" : "https://cdn.discordapp.com/avatars/275867508932608000/1702545b94e23ea7dfc1346a83542792.png?size:2048",
+ "quote" : "1) java stinks and is a big stupid,",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Steve Jobs",
+ "authorImage" : "http://media.syracuse.com/news/photo/2011/01/9177328-large.jpg",
+ "quote" : "It's really hard to design products by focus groups. A lot of times, people don't know what they want until you show it to them.",
+ "year" : "1998",
+ "url" : "https://www.huffingtonpost.com/gregory-ciotti/why-steve-jobs-didnt-list_b_5628355.html"
+ },
+ {
+ "author" : "arencllc",
+ "authorImage" : "https://cdn.discordapp.com/avatars/191290329985581069/e4d6ee5c8836f5c79c51611d0ba536eb.png?size:2048",
+ "quote" : "Coding for uwp is as hard as using a UWP program.",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "FloppyDiskDrive",
+ "authorImage" : "https://cdn.discordapp.com/avatars/228271067821506560/a_0122b441972a6edfa6201ee871fad2a7.gif?size:2048",
+ "quote" : "Victor would be a champ at synchronized thinking.",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Tembot",
+ "authorImage" : "https://cdn.discordapp.com/avatars/361202413165608962/fba99664eb0aeec8a47db3a74a2029d5.png?size:2048",
+ "quote" : "Why are u stocking me",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "TheMemeKnight",
+ "authorImage" : "https://cdn.discordapp.com/avatars/267766634452615168/df08523e0ca30929ceb0dc28dcda8f78.png?size:2048",
+ "quote" : "@Alee14 Do YoU kNoW hOw It FeElS tO bE iN mY sOcKs",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Alee",
+ "authorImage" : "https://cdn.discordapp.com/avatars/242775871059001344/b8a995d836bbb8529ae35dc12c2289de.png?size:2048",
+ "quote" : "You could do me if you want to not show it to the public.",
+ "year" : "2017",
+ "url" : "https://prnt.sc/hfht4v"
+ },
+ {
+ "author" : "Alee",
+ "authorImage" : "https://cdn.discordapp.com/avatars/242775871059001344/b8a995d836bbb8529ae35dc12c2289de.png?size:2048",
+ "quote" : "I want to live in a bus when i'm older",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Tembot",
+ "authorImage" : "https://cdn.discordapp.com/avatars/361202413165608962/fba99664eb0aeec8a47db3a74a2029d5.png?size:2048",
+ "quote" : "wat de hek",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "PieLover12",
+ "authorImage" : "https://cdn.discordapp.com/avatars/344630031303311371/d84ae603ee53a5b54f7b78bcb4f733f2.png?size:2048",
+ "quote" : "DIE YOU LOOK LIKE TINY GIRL",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "(there is a :middle_finger: emoji sitting in Gboard now after my brother sent that to Google assistant)",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "AstralPhaser",
+ "authorImage" : "https://cdn.discordapp.com/avatars/230480971084988417/32f46a9671c6ceedc54b369ea73be178.png?size:2048",
+ "quote" : "anyway, I've gotta go now, I'll be back in 3 \"year\"s",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "Zero electric cars means they don't sell electric cards here",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "Unless you're living in like Denland or something",
+ "year" : "2017",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "[goes and cries in a corner]\nWAAA\nWAAAAAAAAAA\nWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
+ "year" : "2017",
+ "url" : "https://cdn.discordapp.com/attachments/373884824034869249/374564169678061568/unknown.png"
+ },
+ {
+ "author" : "OSFirstTimer",
+ "authorImage" : "https://yt3.ggpht.com/-tQLg1M-3org/AAAAAAAAAAI/AAAAAAAAAAA/-kkOvupMHXQ/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
+ "quote" : "The most popular version of Linux ever called Abuncho. Abuncho 12.10.",
+ "year" : "2012",
+ "url" : "https://youtu.be/PgGbZfR6Vec?t:6s"
+ },
+ {
+ "author" : "Vat19",
+ "authorImage" : "https://s3.amazonaws.com/images1.vat19.com/branding/vat19-mobile-logo-2x.png",
+ "quote" : "VAAAAT NINETEEEEEEN! dot com ._.",
+ "year" : "2017",
+ "url" : "https://youtu.be/tnvcxBns_uQ?t:3m17s"
+ },
+ {
+ "author" : "Victor Tran",
+ "authorImage" : "https://yt3.ggpht.com/-Iuf1v4-SSSM/AAAAAAAAAAI/AAAAAAAAAAA/89IYeQw--wU/photo.jpg",
+ "quote" : "Who needs to say fuck when you can say - instead\nI blame that on my secretary :sob:",
+ "year" : "2018",
+ "url" : "https://www.example.com/"
+ },
+ {
+ "author" : "Steve Jobs",
+ "authorImage" : "http://media.syracuse.com/news/photo/2011/01/9177328-large.jpg",
+ "quote" : "Sometimes life is going to hit you in the head with a brick. Don't lose faith.",
+ "year" : "circa. 2000",
+ "url" : "https://www.example.com/"
+ }
+
+ ]
+}