fix(Message): Fix permissions check in locked threads

#9338 djs
This commit is contained in:
Elysia 2023-04-07 20:36:02 +07:00
parent 34fb1df241
commit bf0fde611c

View File

@ -607,7 +607,7 @@ class Message extends Base {
if (this.channel?.isThread()) { if (this.channel?.isThread()) {
if (this.channel.archived) return false; if (this.channel.archived) return false;
if (this.channel.locked) { 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; if (!permissions?.has(Permissions.FLAGS.MANAGE_THREADS, true)) return false;
} }
} }