diff --git a/src/structure/components/infractions/Lockdown.js b/src/structure/components/infractions/Lockdown.js index 3bbcf79..47a33db 100644 --- a/src/structure/components/infractions/Lockdown.js +++ b/src/structure/components/infractions/Lockdown.js @@ -30,7 +30,7 @@ class LockdownInfraction extends Infraction { async execute() { const existing = await this.client.moderationManager.findLatestInfraction('LOCKDOWN', this.target); - if (!existing._callbacked && !existing.resolved) { + if (existing && !existing._callbacked && !existing.resolved) { return this._fail({ message: this.guild.format('INFRACTION_LOCKDOWN_EXISTING', { case: existing.case }) }); } diff --git a/src/structure/components/inhibitors/Permissions.js b/src/structure/components/inhibitors/Permissions.js index 93adf55..f6e71ce 100644 --- a/src/structure/components/inhibitors/Permissions.js +++ b/src/structure/components/inhibitors/Permissions.js @@ -57,7 +57,7 @@ class Permissions extends Inhibitor { let canRun = false; for (const [id, perm] of Object.entries(perms)) { if (id === user || roles.includes(id)) { - if (perm.global.includes(id)) { + if (perm.global.includes(permission)) { canRun = true; break; }