diff options
| author | Alee <alee14498@gmail.com> | 2018-04-02 18:19:24 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-04-02 18:19:24 -0400 |
| commit | f8668d5607c39c51aef3445257918d7a987a7bb7 (patch) | |
| tree | 74401fe540530b89f0540b4df062f32dab0c2804 | |
| parent | 97450778f4bb490c83ce55d5cfc019005d1e92f0 (diff) | |
| download | AleeBot-f8668d5607c39c51aef3445257918d7a987a7bb7.tar.gz AleeBot-f8668d5607c39c51aef3445257918d7a987a7bb7.tar.bz2 AleeBot-f8668d5607c39c51aef3445257918d7a987a7bb7.zip | |
Added victor's swearing and new command!
| -rw-r--r-- | bot_discord.js | 8 | ||||
| -rw-r--r-- | commands/vtquote.js | 65 | ||||
| -rw-r--r-- | storage/vtquotes.json | 39 |
3 files changed, 112 insertions, 0 deletions
diff --git a/bot_discord.js b/bot_discord.js index d05c086..05c40c8 100644 --- a/bot_discord.js +++ b/bot_discord.js @@ -136,6 +136,14 @@ log("[X | UNCAUGHT PROMISE] " + err.stack); });
+process.on('uncaughtException', function (exception) {
+ log(exception);
+});
+
+client.on("error", error => {
+ log(error);
+});
+
client.login(config.abtoken).catch(function() {
log('[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.');
diff --git a/commands/vtquote.js b/commands/vtquote.js new file mode 100644 index 0000000..f5f9f14 --- /dev/null +++ b/commands/vtquote.js @@ -0,0 +1,65 @@ +/**************************************** + * + * VTQuote: Command for AleeBot + * Copyright (C) 2018 AleeCorp + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * *************************************/ +module.exports.run = async (client, message) => { + const Discord = require('discord.js'); + + let VictorQuote; + + function GetVictorQuote(quoteNum = -1) { + VictorQuote = new Discord.RichEmbed(); + + let quo = require('../storage/vtquotes.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; + + VictorQuote.setAuthor(author, authorImage); + VictorQuote.setColor('#1fd619'); + VictorQuote.setDescription(quote); + VictorQuote.setFooter('- ' + year); + VictorQuote.setURL(url); + + return VictorQuote; + } + + const victorquote = GetVictorQuote(); + message.reply('Alright, here\'s your Victor quote.') + message.channel.send(victorquote); + }; + + exports.conf = { + aliases: [], + guildOnly: false, + }; + exports.help = { + name: 'vtquote', + description: 'Tells you quotes when victor accidentaly swore.', + usage: 'vtquote', + category: '- General Commands', + }; +
\ No newline at end of file diff --git a/storage/vtquotes.json b/storage/vtquotes.json new file mode 100644 index 0000000..a26b500 --- /dev/null +++ b/storage/vtquotes.json @@ -0,0 +1,39 @@ +{ + "quotes" :[ + { + "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" : "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" : "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/" + } + ] +}
\ No newline at end of file |
