Skip to content

Commit

Permalink
fix(preconditions): fixed UserPermissions precondition
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Aug 23, 2021
1 parent 32d591b commit 1848f53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/preconditions/UserPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CorePrecondition extends Precondition {
const required = (context.permissions as Permissions) ?? new Permissions();
const channel = message.channel as TextChannel | NewsChannel;

const permissions = message.guild ? channel.permissionsFor(message.client.id!)! : this.dmChannelPermissions;
const permissions = message.guild ? channel.permissionsFor(message.author)! : this.dmChannelPermissions;
const missing = permissions.missing(required);
return missing.length === 0
? this.ok()
Expand Down

0 comments on commit 1848f53

Please sign in to comment.