mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Add Perm Check to Translate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user