Skip to content

Commit 1848f53

Browse files
committed
fix(preconditions): fixed UserPermissions precondition
1 parent 32d591b commit 1848f53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/preconditions/UserPermissions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class CorePrecondition extends Precondition {
2323
const required = (context.permissions as Permissions) ?? new Permissions();
2424
const channel = message.channel as TextChannel | NewsChannel;
2525

26-
const permissions = message.guild ? channel.permissionsFor(message.client.id!)! : this.dmChannelPermissions;
26+
const permissions = message.guild ? channel.permissionsFor(message.author)! : this.dmChannelPermissions;
2727
const missing = permissions.missing(required);
2828
return missing.length === 0
2929
? this.ok()

0 commit comments

Comments
 (0)