Switch Things to Linking

This commit is contained in:
Daniel Odendahl Jr
2017-05-25 23:20:58 +00:00
parent 26a94a9619
commit fba5f67b48
8 changed files with 8 additions and 36 deletions
+1 -5
View File
@@ -13,14 +13,10 @@ module.exports = class CatCommand extends Command {
}
async run(msg) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
try {
const { body } = await snekfetch
.get('http://random.cat/meow');
return msg.say({ files: [body.file] })
.catch(err => msg.say(`${err.name}: ${err.message}`));
return msg.say(body.file);
} catch (err) {
return msg.say(`${err.name}: ${err.message}`);
}
+1 -5
View File
@@ -12,14 +12,10 @@ module.exports = class DogCommand extends Command {
}
async run(msg) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
try {
const { body } = await snekfetch
.get('https://random.dog/woof.json');
return msg.say({ files: [body.url] })
.catch(err => msg.say(`${err.name}: ${err.message}`));
return msg.say(body.url);
} catch (err) {
return msg.say(`${err.name}: ${err.message}`);
}