Lots of changes

This commit is contained in:
dragonfire535
2017-10-07 11:18:08 -04:00
parent e81226dbd6
commit a006a8a8de
32 changed files with 68 additions and 53 deletions
-25
View File
@@ -1,25 +0,0 @@
const { Command } = require('discord.js-commando');
const snekfetch = require('snekfetch');
module.exports = class CatCommand extends Command {
constructor(client) {
super(client, {
name: 'cat',
aliases: ['neko', 'kitty'],
group: 'random-img',
memberName: 'cat',
description: 'Responds with a random cat image.',
clientPermissions: ['ATTACH_FILES']
});
}
async run(msg) {
try {
const { body } = await snekfetch
.get('http://random.cat/meow');
return msg.say({ files: [body.file] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
-25
View File
@@ -1,25 +0,0 @@
const { Command } = require('discord.js-commando');
const snekfetch = require('snekfetch');
module.exports = class DogCommand extends Command {
constructor(client) {
super(client, {
name: 'dog',
aliases: ['puppy'],
group: 'random-img',
memberName: 'dog',
description: 'Responds with a random dog image.',
clientPermissions: ['ATTACH_FILES']
});
}
async run(msg) {
try {
const { body } = await snekfetch
.get('https://dog.ceo/api/breeds/image/random');
return msg.say({ files: [body.message] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
-19
View File
@@ -1,19 +0,0 @@
const { Command } = require('discord.js-commando');
const nimbats = require('../../assets/json/fidget');
module.exports = class FidgetCommand extends Command {
constructor(client) {
super(client, {
name: 'fidget',
aliases: ['nimbat'],
group: 'random-img',
memberName: 'fidget',
description: 'Responds with a random image of Fidget.',
clientPermissions: ['ATTACH_FILES']
});
}
run(msg) {
return msg.say({ files: [nimbats[Math.floor(Math.random() * nimbats.length)]] });
}
};
-19
View File
@@ -1,19 +0,0 @@
const { Command } = require('discord.js-commando');
const xiaos = require('../../assets/json/xiao');
module.exports = class XiaoCommand extends Command {
constructor(client) {
super(client, {
name: 'xiao',
aliases: ['xiao-pai', 'iao'],
group: 'random-img',
memberName: 'xiao',
description: 'Responds with a random image of Xiao Pai.',
clientPermissions: ['ATTACH_FILES']
});
}
run(msg) {
return msg.say({ files: [xiaos[Math.floor(Math.random() * xiaos.length)]] });
}
};