diff --git a/structure/client/DiscordClient.js b/structure/client/DiscordClient.js index 00648e3..ad80218 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}`); } } @@ -176,7 +176,7 @@ class DiscordClient extends Client { } get prefix() { - return this._options.prefix; + return this._options.bot.prefix; } get storage() { 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(); 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 = []; 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?", "(?