mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 20:24:47 +12:00
fix(Message): Fix permissions check in locked threads (#9338)
fix(Message#editable): fix permissions check if channel is thread & locked Co-authored-by: Erwan <erwan977@gmail.com>
This commit is contained in:
parent
09ca243c2f
commit
a8d5325def
1 changed files with 1 additions and 1 deletions
|
@ -605,7 +605,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(Permissions.FLAGS.MANAGE_THREADS, true)) return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue