This commit is contained in:
Daniel Odendahl Jr
2017-04-30 22:56:59 +00:00
parent 83e990ae1c
commit 877f720cfc
105 changed files with 460 additions and 461 deletions
+6 -6
View File
@@ -14,16 +14,16 @@ module.exports = class CatCommand extends Command {
});
}
async run(message) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
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 request
.get('http://random.cat/meow');
return message.channel.send({files: [body.file]});
return msg.channel.send({files: [body.file]});
} catch (err) {
return message.say('An Unknown Error Occurred.');
return msg.say('An Unknown Error Occurred.');
}
}
};
+6 -6
View File
@@ -11,16 +11,16 @@ module.exports = class DogCommand extends Command {
});
}
async run(message) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
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 request
.get('https://random.dog/woof.json');
return message.channel.send({files: [body.url]});
return msg.channel.send({files: [body.url]});
} catch (err) {
return message.say('An Unknown Error Occurred.');
return msg.say('An Unknown Error Occurred.');
}
}
};
+2 -2
View File
@@ -11,8 +11,8 @@ module.exports = class VocaloidCommand extends Command {
});
}
run(message) {
run(msg) {
const song = songs[Math.floor(Math.random() * songs.length)];
return message.say(song);
return msg.say(song);
}
};
+5 -5
View File
@@ -14,11 +14,11 @@ module.exports = class XiaoCommand extends Command {
});
}
run(message) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
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.');
const xiao = xiaos[Math.floor(Math.random() * xiaos.length)];
return message.channel.send({files: [xiao]});
return msg.channel.send({files: [xiao]});
}
};