From 5881cae922e44a93cff005f497dd02e7bbdfaee9 Mon Sep 17 00:00:00 2001 From: Alee Date: Wed, 1 Aug 2018 22:46:19 -0400 Subject: Added features from AleeBot --- commands/Utility/info.js | 32 +++++++++++++++++++++++++++ commands/Utility/quote.js | 54 +++++++++++++++++++++++++++++++++++++++++++++ commands/Utility/vtquote.js | 54 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 commands/Utility/info.js create mode 100644 commands/Utility/quote.js create mode 100644 commands/Utility/vtquote.js (limited to 'commands/Utility') diff --git a/commands/Utility/info.js b/commands/Utility/info.js new file mode 100644 index 0000000..d75e399 --- /dev/null +++ b/commands/Utility/info.js @@ -0,0 +1,32 @@ +/**************************************** + * + * Info: Plugin for Galaxy that tells you about the server host info. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ +module.exports.run = async (client, message) => { + const Discord = require('discord.js'); + const os = require('os'); + const embed = new Discord.RichEmbed() + .setTitle('Information on AleeBot\'s Host') + .addField('OS Hostname: ', os.hostname() , true) + .addField('NodeJS Version: ', process.versions.node , true) + .addField('OS Platform: ', os.platform() , true) + .addField('OS Version: ', os.release() , true) + .setColor('#1fd619'); + message.channel.send({embed}); + }; + + exports.conf = { + aliases: [], + guildOnly: false, + }; + exports.help = { + name: 'info', + description: 'Tells you information about the bot', + usage: 'info', + category: '- Information Commands', + }; + \ No newline at end of file diff --git a/commands/Utility/quote.js b/commands/Utility/quote.js new file mode 100644 index 0000000..8098400 --- /dev/null +++ b/commands/Utility/quote.js @@ -0,0 +1,54 @@ +/**************************************** + * + * Quote: Plugin for Galaxy that gives you quotes. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ +module.exports.run = async (client, message) => { +const Discord = require('discord.js'); + +let NewQuote; + + function GetNewQuote(quoteNum = -1) { + NewQuote = new Discord.RichEmbed(); + + let quo = require('../assets/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; + + NewQuote.setAuthor(author, authorImage); + NewQuote.setColor('#1fd619'); + NewQuote.setDescription(quote); + NewQuote.setFooter('- ' + year); + NewQuote.setURL(url); + + return NewQuote; + } + + const newquote = GetNewQuote(); + message.reply('Alright, here\'s your quote.') + message.channel.send(newquote); +}; + +exports.conf = { + aliases: [], + guildOnly: false, + }; + exports.help = { + name: 'quote', + description: 'Tells you quotes', + usage: 'quote', + category: '- Quote Commands', + }; + \ No newline at end of file diff --git a/commands/Utility/vtquote.js b/commands/Utility/vtquote.js new file mode 100644 index 0000000..ec85888 --- /dev/null +++ b/commands/Utility/vtquote.js @@ -0,0 +1,54 @@ +/**************************************** + * + * VTQuote: Plugin for Galaxy that tells you VT quotes. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ +module.exports.run = async (client, message) => { + const Discord = require('discord.js'); + + let VictorQuote; + + function GetVictorQuote(quoteNum = -1) { + VictorQuote = new Discord.RichEmbed(); + + let quo = require('../assets/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: '- Quote Commands', + }; + \ No newline at end of file -- cgit v1.2.3