Why does this even work

This commit is contained in:
Daniel Odendahl Jr
2018-06-10 01:26:20 +00:00
parent c8d78901c7
commit 2dd81a23ea
9 changed files with 22 additions and 19 deletions
+2 -1
View File
@@ -24,9 +24,10 @@ module.exports = class KitsuAnimeCommand extends Command {
async run(msg, { query }) {
try {
const { body } = await request
const { text } = await request
.get('https://kitsu.io/api/edge/anime')
.query({ 'filter[text]': query });
const body = JSON.parse(text);
if (!body.data.length) return msg.say('Could not find any results.');
const data = body.data[0].attributes;
const embed = new MessageEmbed()
+2 -1
View File
@@ -24,9 +24,10 @@ module.exports = class KitsuMangaCommand extends Command {
async run(msg, { query }) {
try {
const { body } = await request
const { text } = await request
.get('https://kitsu.io/api/edge/manga')
.query({ 'filter[text]': query });
const body = JSON.parse(text);
if (!body.data.length) return msg.say('Could not find any results.');
const data = body.data[0].attributes;
const embed = new MessageEmbed()
@@ -8,7 +8,7 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command {
constructor(client) {
super(client, {
name: 'league-of-legends-champion',
aliases: ['lol-champion', 'league-of-legends-champ', 'lol-champ'],
aliases: ['lol-champion', 'league-of-legends-champ', 'lol-champ', 'league-champ'],
group: 'search',
memberName: 'league-of-legends-champion',
description: 'Responds with information on a League of Legends champion.',
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = class NeopetsItemCommand extends Command {
async run(msg, { item }) {
try {
const data = await this.fetchItem(item);
if (!data) return msg.say('Could not find any results');
if (!data) return msg.say('Could not find any results.');
const embed = new MessageEmbed()
.setColor(0xFFCE31)
.setAuthor('Neopets', 'https://i.imgur.com/BP8qxJH.png', 'http://www.neopets.com/')
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = class RottenTomatoesCommand extends Command {
constructor(client) {
super(client, {
name: 'rotten-tomatoes',
aliases: ['tomato-meter'],
aliases: ['tomato-meter', 'r-tomatoes'],
group: 'search',
memberName: 'rotten-tomatoes',
description: 'Searches Rotten Tomatoes for your query.',
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = class RuleOfTheInternetCommand extends Command {
constructor(client) {
super(client, {
name: 'rule-of-the-internet',
aliases: ['rules-of-the-internet', 'internet-rule', 'rule'],
aliases: ['rules-of-the-internet', 'internet-rule', 'rule', 'rules'],
group: 'search',
memberName: 'rule-of-the-internet',
description: 'Responds with a rule of the internet.',
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = class YoutubeCommand extends Command {
constructor(client) {
super(client, {
name: 'youtube',
aliases: ['youtube-video'],
aliases: ['youtube-video', 'y-tube', 'u-tube'],
group: 'search',
memberName: 'youtube',
description: 'Searches YouTube for your query.',