From dd8872c027c7e7e1a00f38d659b4d6e79274238c Mon Sep 17 00:00:00 2001 From: Palm Date: Thu, 5 Sep 2024 17:33:06 +0700 Subject: [PATCH] fix(bots/discord): correct permission check logic Members were being previously treated as users and some requirements are passing by default when they must not. --- bots/discord/src/classes/Command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/discord/src/classes/Command.ts b/bots/discord/src/classes/Command.ts index 0331d0f..95cc0be 100644 --- a/bots/discord/src/classes/Command.ts +++ b/bots/discord/src/classes/Command.ts @@ -373,7 +373,7 @@ export default class Command< memberRequirementsForUsers = 'pass', } = this.requirements - const member = this.isGuildSpecific() ? null : (executor as GuildMember) + const member = this.isGuildSpecific() ? (executor as GuildMember) : null const boolDefaultCondition = defaultCondition !== 'fail' const boolMemberRequirementsForUsers = memberRequirementsForUsers !== 'fail'