Skip to content

$addMessageFlags

$addMessageFlags allows you to add specific flags to a message.

Usage

$addMessageFlags[channelID;messageID;flags...]

Parameters

FieldTypeDescriptionRequired
channelIDnumberID of the channel where the message is located.true
messageIDnumberThe ID of the message to update.true
flags…stringThe message flags to add.true

Message Flags

NameIDDescription
Crossposted1This message has been published to subscribed channels (via Channel Following).
IsCrosspost2This message originated from another channel (via Channel Following).
SuppressEmbeds4Do not include any embeds when serializing this message.
SourceMessageDeleted8The source message for this crosspost has been deleted.
Urgent16This message came from the urgent message system.
HasThread32This message has an associated thread, which shares its ID.
Ephemeral64This message is only visible to the user who invoked the interaction.
Loading128This message is an interaction response and the bot is “thinking”.
FailedToMentionSomeRolesInThread256This message failed to mention some roles and add their members to the thread.
ShouldShowLinkNotDiscordWarning1024This message flag is not documented by Discord but has a known value.
SuppressNotifications4096This message will not trigger push and desktop notifications.
IsVoiceMessage8192This message is a voice message.

Example(s)

This will send a message and then suppress its embeds:

1
client.command({
2
name: "addMessageFlags",
3
code: `
4
$addMessageFlags[$channelID;$get[msg];SuppressEmbeds]
5
$let[msg;$channelSendMessage[$channelID;The documentation preview will not be shown. https://aoi.js.org/ ;true]]
6
`});
1
client.command({
2
name: "addMessageFlags",
3
code: `
4
$addMessageFlags[$channelID;$get[msg];4]
5
$let[msg;$channelSendMessage[$channelID;The documentation preview will not be shown. https://aoi.js.org/ ;true]]
6
`});