mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01: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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user