fix(Message): not crosspostable if has a poll

#10246 backport
This commit is contained in:
Elysia
2024-09-17 18:48:52 +07:00
parent bd1d157552
commit a7355c78c3

View File

@@ -649,6 +649,7 @@ class Message extends Base {
channel?.type === 'GUILD_NEWS' && channel?.type === 'GUILD_NEWS' &&
!this.flags.has(MessageFlags.FLAGS.CROSSPOSTED) && !this.flags.has(MessageFlags.FLAGS.CROSSPOSTED) &&
this.type === 'DEFAULT' && this.type === 'DEFAULT' &&
!this.poll &&
channel.viewable && channel.viewable &&
channel.permissionsFor(this.client.user)?.has(bitfield, false) && channel.permissionsFor(this.client.user)?.has(bitfield, false) &&
!deletedMessages.has(this), !deletedMessages.has(this),