Add Perm Check to Translate

This commit is contained in:
Daniel Odendahl Jr
2017-05-20 15:26:06 +00:00
parent e2130e179d
commit 427655ea22
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -44,6 +44,9 @@ module.exports = class TranslateCommand extends Command {
}
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS'))
return msg.say('This Command requires the `Embed Links` Permission.');
const { text, to, from } = args;
try {
const { body } = await snekfetch