fix(Message): not crosspostable if has a poll (#10246)

This commit is contained in:
Almeida
2024-05-04 17:21:04 +01:00
committed by GitHub
parent cb961f5be3
commit a6b9f1b37e

View File

@@ -728,6 +728,7 @@ class Message extends Base {
channel?.type === ChannelType.GuildAnnouncement &&
!this.flags.has(MessageFlags.Crossposted) &&
this.type === MessageType.Default &&
!this.poll &&
channel.viewable &&
channel.permissionsFor(this.client.user)?.has(bitfield, false),
);