forked from Galactic/galactic-bot
bugfix
This commit is contained in:
parent
bc1ee11a63
commit
ef9c631bc6
@ -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 }) });
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user