Vocaloid Upgrade, Steam Change, Fix Portal

This commit is contained in:
Daniel Odendahl Jr
2017-07-30 21:50:20 +00:00
parent a3d49130b3
commit ad17cef133
8 changed files with 58 additions and 64 deletions
-42
View File
@@ -1,42 +0,0 @@
[
"https://www.youtube.com/watch?v=ebAKoRcYFTA",
"https://www.youtube.com/watch?v=Mqps4anhz0Q",
"https://www.youtube.com/watch?v=AUEiHQOCQ2M",
"https://www.youtube.com/watch?v=oyteTOBxRm8",
"https://www.youtube.com/watch?v=uwwU55zBYlQ",
"https://www.youtube.com/watch?v=sSYoz0JmnZo",
"https://www.youtube.com/watch?v=NpU4dsXW6EI",
"https://www.youtube.com/watch?v=MzyXD8bNbvk",
"https://www.youtube.com/watch?v=hyV4qGAPKac",
"https://www.youtube.com/watch?v=pywNi6gD1FA",
"https://www.youtube.com/watch?v=17FEtaiWdVg",
"https://www.youtube.com/watch?v=fmrA-gxJxgQ",
"https://www.youtube.com/watch?v=yOBWgSPrYVA",
"https://www.youtube.com/watch?v=nCaqf9WhqOY",
"https://www.youtube.com/watch?v=cQKGUgOfD8U",
"https://www.youtube.com/watch?v=sK92X82T3Sk",
"https://www.youtube.com/watch?v=AH5_sKwDw1E",
"https://www.youtube.com/watch?v=dw-KJNqcK-Q",
"https://www.youtube.com/watch?v=X47JmmqbMvc",
"https://www.youtube.com/watch?v=ojQPpYVQt7U",
"https://www.youtube.com/watch?v=N1-Z8uslIsI",
"https://www.youtube.com/watch?v=EAgk-t2zzqw",
"https://www.youtube.com/watch?v=uLBC2kWYFo8",
"https://www.youtube.com/watch?v=OXHYIlkZLUU",
"https://www.youtube.com/watch?v=ObIa9wXbyMQ",
"https://www.youtube.com/watch?v=dGNoCICGmo0",
"https://www.youtube.com/watch?v=LcoyEZkTKfY",
"https://www.youtube.com/watch?v=mKHaW0qd5Mw",
"https://www.youtube.com/watch?v=GG627DYk_E4",
"https://www.youtube.com/watch?v=jTm6Q5Pj_Jo",
"https://www.youtube.com/watch?v=TVeIDmk3rBo",
"https://www.youtube.com/watch?v=1K3in6w9tt4",
"https://www.youtube.com/watch?v=07r67gGbtLQ",
"https://www.youtube.com/watch?v=243vPl8HdVk",
"https://www.youtube.com/watch?v=zweVJrnE1uY",
"https://www.youtube.com/watch?v=RKtoreimcQ8",
"https://www.youtube.com/watch?v=Je6dCVfHvkU",
"https://www.youtube.com/watch?v=UxFv12y_evM",
"https://www.youtube.com/watch?v=2HegQtmJeto",
"https://www.youtube.com/watch?v=8-Epnpruww0"
]
-18
View File
@@ -1,18 +0,0 @@
const Command = require('../../structures/Command');
const songs = require('../../assets/json/vocaloid');
module.exports = class VocaloidCommand extends Command {
constructor(client) {
super(client, {
name: 'vocaloid',
group: 'random-res',
memberName: 'vocaloid',
description: 'Responds with a random VOCALOID song.'
});
}
run(msg) {
const song = songs[Math.floor(Math.random() * songs.length)];
return msg.say(song);
}
};
+1 -1
View File
@@ -26,7 +26,7 @@ module.exports = class PortalSendCommand extends Command {
async run(msg, args) {
const { message } = args;
const channels = this.client.channels.filter(c => c.guild.id !== msg.guild.id && c.type === 'text');
const channels = this.client.channels.filter(c => c.type === 'text' && c.guild.id !== msg.guild.id);
const channel = parseTopic(channels, 'portal', this.client.user).random();
if (!channel) return msg.say('Aww... No channel has an open portal...');
try {
+3 -1
View File
@@ -35,9 +35,11 @@ module.exports = class SteamCommand extends Command {
const price = current === original ? `$${current}` : `~~$${original}~~ $${current}`;
const embed = new MessageEmbed()
.setColor(0x101D2F)
.setAuthor(`Steam - ${body.items[0].name}`, 'https://i.imgur.com/vL8b4D5.png')
.setAuthor('Steam', 'https://i.imgur.com/vL8b4D5.png')
.setURL(`http://store.steampowered.com/app/${body.items[0].id}`)
.setImage(body.items[0].tiny_image)
.addField(' Title',
body.items[0].name)
.addField(' Price',
price, true)
.addField(' Metascore',
+50
View File
@@ -0,0 +1,50 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const snekfetch = require('snekfetch');
const moment = require('moment');
module.exports = class VocaloidCommand extends Command {
constructor(client) {
super(client, {
name: 'vocaloid',
aliases: ['vocadb'],
group: 'search',
memberName: 'vocaloid',
description: 'Searches VocaDB for your query.',
args: [
{
key: 'query',
prompt: 'What song would you like to search for?',
type: 'string'
}
]
});
}
async run(msg, args) {
const { query } = args;
const { body } = await snekfetch
.get('http://vocadb.net/api/songs')
.query({
query,
maxResults: 1,
getTotalCount: true,
sort: 'FavoritedTimes',
preferAccurateMatches: true,
nameMatchMode: 'Exact'
});
if (!body.totalCount) return msg.say('No Results.');
const embed = new MessageEmbed()
.setAuthor('VocaDB', 'https://i.imgur.com/MklQqa2.png')
.setURL(`http://vocadb.net/S/${body.items[0].id}`)
.addField(' Title',
body.items[0].name)
.addField(' Artist',
body.items[0].artistString)
.addField(' Publish Date',
moment(body.items[0].publishDate).format('MMMM Do YYYY'), true)
.addField(' Length',
(body.items[0].lengthSeconds / 60).toFixed(2).replace(/\./g, ':'), true);
return msg.embed(embed);
}
};
+2 -1
View File
@@ -29,7 +29,7 @@
<li>Strawpoll Generation!</li>
<li>Events that Happened today in history!</li>
<li>Would you rather questions!</li>
<li>Random Cats, Dogs, VOCALOID Songs, and Xiao Pai Images!</li>
<li>Random Cats, Dogs, and Xiao Pai Images!</li>
<li>8 Ball, Choose, Coin Flip, Magic Conch, Roll, and Member Roulette!</li>
<li>Waifu and Ship Rating!</li>
<li>Random Compliments, Chuck Norris Jokes, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!</li>
@@ -56,6 +56,7 @@
<li>SoundCloud</li>
<li>Steam</li>
<li>Urban Dictionary</li>
<li>VocaDB</li>
<li>Wattpad</li>
<li>Wikia (Any Wiki)</li>
<li>Wikipedia</li>
+1
View File
@@ -53,6 +53,7 @@
<li>SoundCloud</li>
<li>Steam</li>
<li>Urban Dictionary</li>
<li>VocaDB</li>
<li>Wattpad</li>
<li>Wikia (Any Wiki)</li>
<li>Wikipedia</li>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "28.1.1",
"version": "28.2.0",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {