From 12312de86984d6bbce5cd137a41cf0f635a187af Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 11 Jun 2021 04:22:04 +0300 Subject: [PATCH] bugfixes --- structure/client/components/observers/Automoderation.js | 2 +- structure/extensions/Guild.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/structure/client/components/observers/Automoderation.js b/structure/client/components/observers/Automoderation.js index 5a09712..8728d89 100644 --- a/structure/client/components/observers/Automoderation.js +++ b/structure/client/components/observers/Automoderation.js @@ -98,7 +98,7 @@ module.exports = class AutoModeration extends Observer { if (command?.name === 'settings') { // NOTE: probably needs a more permanent solution - const result = await this.client.registry.components.get('observer:permissions').execute(message, message.command); + const result = await this.client.registry.components.get('inhibitor:permissions').execute(message, message.command); if (!result.error) return; } diff --git a/structure/extensions/Guild.js b/structure/extensions/Guild.js index 8cc63cd..44eca44 100644 --- a/structure/extensions/Guild.js +++ b/structure/extensions/Guild.js @@ -93,6 +93,7 @@ const Guild = Structures.extend('Guild', (Guild) => { const result = await this.client.storage.mongodb.webhooks.findOne({ feature, guild: this.id }); if (!result) return false; + if (!this.me.hasPermission('MANAGE_WEBHOOKS')) return false; const hooks = await this.fetchWebhooks(); const hook = hooks.get(result.hookID); if (!hook) return false;