From 427655ea22eccd1a1c1821de7bef1a01838b7589 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 20 May 2017 15:26:06 +0000 Subject: [PATCH] Add Perm Check to Translate --- commands/textedit/translate.js | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/textedit/translate.js b/commands/textedit/translate.js index 963169e9..ac776a04 100644 --- a/commands/textedit/translate.js +++ b/commands/textedit/translate.js @@ -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 diff --git a/package.json b/package.json index 7002d4a8..31817f5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "19.10.0", + "version": "19.10.1", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {