From 771f7c68753082149a6485d54b7cec652d077c70 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 20 Jun 2020 00:02:59 +0300 Subject: [PATCH] cleanup --- structure/client/components/inhibitors/Restricted.js | 2 +- structure/extensions/GuildMember.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/structure/client/components/inhibitors/Restricted.js b/structure/client/components/inhibitors/Restricted.js index 12a89ce..b1cef87 100644 --- a/structure/client/components/inhibitors/Restricted.js +++ b/structure/client/components/inhibitors/Restricted.js @@ -13,7 +13,7 @@ class Restricted extends Inhibitor { } execute(message, command) { - if(command.restricted && !this.client._options.bot.owners.includes(message.author.id)) { + if(command.restricted && !message.author.developer) { return super._fail(); } return super._succeed(); diff --git a/structure/extensions/GuildMember.js b/structure/extensions/GuildMember.js index ca5f6ea..f63e365 100644 --- a/structure/extensions/GuildMember.js +++ b/structure/extensions/GuildMember.js @@ -32,6 +32,10 @@ const GuildMember = Structures.extend('GuildMember', (GuildMember) => { } + get admin() { + return this.user.developer || this.hasPermission('ADMINISTRATOR') || this.hasPermission('MANAGE_GUILD'); + } + get timeSinceCached() { return Date.now()-this._cached; }