From 0e7b025c55d73ed713e8ec8d1291931969bc9801 Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 11 Jun 2021 13:06:43 +0300 Subject: [PATCH 1/5] yet another bugfix for permissions --- structure/client/components/inhibitors/Permissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/client/components/inhibitors/Permissions.js b/structure/client/components/inhibitors/Permissions.js index a21c660..5036d80 100644 --- a/structure/client/components/inhibitors/Permissions.js +++ b/structure/client/components/inhibitors/Permissions.js @@ -27,7 +27,7 @@ class Permissions extends Inhibitor { //NOTE: Rewrite this entire fucking file :) if(missing.length === permissions.length && permissions.length > 0) return super._fail({ missing: missing.join(', ') }); return super._succeed(); - } else if(permissionType === 'grant' && command.permissionRequired) { + } else if(permissionType === 'grant' && permissions.length) { // vv Prevent Softlock vv if(safeCommands.includes(command.resolveable) && (this._checkDiscord(message, ['ADMINISTRATOR']).length === 0 || this._checkDiscord(message, ['MANAGE_GUILD']).length === 0)) { return super._succeed(); From 811dfe7d432a364e72914adbef460fe37f81f9f2 Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 11 Jun 2021 22:15:15 +0300 Subject: [PATCH 2/5] bugfix --- structure/client/DiscordClient.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/structure/client/DiscordClient.js b/structure/client/DiscordClient.js index 00648e3..db1cf0d 100644 --- a/structure/client/DiscordClient.js +++ b/structure/client/DiscordClient.js @@ -76,7 +76,7 @@ class DiscordClient extends Client { this.logger.info(`Took ${Date.now()-beforeTime}ms to build the client.`); process.on("unhandledRejection", (error) => { - this.client.logger.error(`Unhandled Promise Rejection:\n${error.stack || error}`); + this.logger.error(`Unhandled Promise Rejection:\n${error.stack || error}`); }); this._built = true; @@ -106,7 +106,7 @@ class DiscordClient extends Client { // eslint-disable-next-line no-eval template = eval(template); } catch(error) { - this.client.logger.error(`Error in locale ${language}:${index} while executing code.\n${error.stack || error}`); + this.logger.error(`Error in locale ${language}:${index} while executing code.\n${error.stack || error}`); } } From 060892b83aaa6cc6750236950ff70dbf06f9cb79 Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 11 Jun 2021 22:17:50 +0300 Subject: [PATCH 3/5] guild not defined in dms --- structure/interfaces/Command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/interfaces/Command.js b/structure/interfaces/Command.js index 35bd311..ddd0305 100644 --- a/structure/interfaces/Command.js +++ b/structure/interfaces/Command.js @@ -61,7 +61,7 @@ class Command extends Component { usageEmbed(message, verbose = false) { const { guild } = message; - const type = guild._settings.permissionType; + const type = guild?._settings.permissionType; const prefix = guild?.prefix || this.client.prefix; const fields = []; From 090d53f1a4b93b325735bbadaa42c3ec93cdfe20 Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 11 Jun 2021 22:19:50 +0300 Subject: [PATCH 4/5] prefix undefined fix --- structure/client/DiscordClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/client/DiscordClient.js b/structure/client/DiscordClient.js index db1cf0d..ad80218 100644 --- a/structure/client/DiscordClient.js +++ b/structure/client/DiscordClient.js @@ -176,7 +176,7 @@ class DiscordClient extends Client { } get prefix() { - return this._options.prefix; + return this._options.bot.prefix; } get storage() { From fddcd1752d8bc157d9650b053c85918dc9b8c613 Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 11 Jun 2021 22:29:01 +0300 Subject: [PATCH 5/5] filter presets tweaks --- util/filterPresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/filterPresets.json b/util/filterPresets.json index 6848c85..99f66df 100644 --- a/util/filterPresets.json +++ b/util/filterPresets.json @@ -1,7 +1,7 @@ { "regex": { "slurs": [ - "n(ae|ea|ji|j|y|i|x|!|1|\\||l)(gg?|qq|99?|bb)(?!(ht|el))((e|3)r|let|ur|\\s?nog|y|ah?|or)?s?", + "n(ae|ji|j|y|i|x|!|1|\\||l)(gg?|qq|99?|bb)(?!(ht|el|un))((e|3)r|let|ur|\\s?nog|y|ah?|or)?s?", "(?