This commit is contained in:
Erik 2022-07-07 22:38:17 +03:00
parent bc1ee11a63
commit ef9c631bc6
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 2 additions and 2 deletions

View File

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

View File

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