Skip to content

Commit

Permalink
fix(Message#editable): fix permissions check in locked threads (#9319)
Browse files Browse the repository at this point in the history
fix(Message#editable): fix permissions check if channel is thread & locked

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
ErwanGit and kodiakhq[bot] committed Apr 14, 2023
1 parent 79bcdfa commit d4c1fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/structures/Message.js
Expand Up @@ -608,7 +608,7 @@ class Message extends Base {
if (this.channel?.isThread()) {
if (this.channel.archived) return false;
if (this.channel.locked) {
const permissions = this.permissionsFor(this.client.user);
const permissions = this.channel.permissionsFor(this.client.user);
if (!permissions?.has(PermissionFlagsBits.ManageThreads, true)) return false;
}
}
Expand Down

0 comments on commit d4c1fec

Please sign in to comment.