mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Why does this even work
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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.',
|
||||
|
||||
@@ -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/')
|
||||
|
||||
@@ -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.',
|
||||
|
||||
@@ -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.',
|
||||
|
||||
@@ -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.',
|
||||
|
||||
Reference in New Issue
Block a user