mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
feat: Backport sending message flags (#7560)
This commit is contained in:
@@ -148,11 +148,17 @@ class MessagePayload {
|
||||
}
|
||||
|
||||
let flags;
|
||||
if ((this.isMessage && typeof this.options.reply === 'undefined') || this.isMessageManager) {
|
||||
if (
|
||||
typeof this.options.flags !== 'undefined' ||
|
||||
(this.isMessage && typeof this.options.reply === 'undefined') ||
|
||||
this.isMessageManager
|
||||
) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
flags = this.options.flags != null ? new MessageFlags(this.options.flags).bitfield : this.target.flags?.bitfield;
|
||||
} else if (isInteraction && this.options.ephemeral) {
|
||||
flags = MessageFlags.FLAGS.EPHEMERAL;
|
||||
}
|
||||
|
||||
if (isInteraction && this.options.ephemeral) {
|
||||
flags |= MessageFlags.FLAGS.EPHEMERAL;
|
||||
}
|
||||
|
||||
let allowedMentions =
|
||||
|
||||
Reference in New Issue
Block a user