This commit is contained in:
Erik 2021-06-11 04:22:04 +03:00
parent 40e41af6ad
commit 12312de869
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;