UserMessageCreateBuilder

Message builder for creating messages as a bot user.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The mentions in the message that are allowed to trigger a ping.

Link copied to clipboard

The attachment objects with filename and description.

Link copied to clipboard

The components to include with the message.

Link copied to clipboard
override var content: String?

The message contents (up to 2000 characters).

Link copied to clipboard

Up to 10 embeds (up to 6000 characters).

Link copied to clipboard

If true and nonce is present, it will be checked for uniqueness in the past few minutes. If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.

Link copied to clipboard

Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, defaults to true.

Link copied to clipboard
override val files: MutableList<NamedFile>

The files to include as attachments.

Link copied to clipboard
override var flags: MessageFlags?

Optional custom MessageFlags to add to the message created.

Link copied to clipboard

The id of the message being replied to.

Link copied to clipboard

A value that can be used to verify a message was sent (up to 25 characters).

Link copied to clipboard

The IDs of up to three stickers to send in the message.

Link copied to clipboard
override var suppressEmbeds: Boolean?

Do not include any embeds when serializing this message.

Link copied to clipboard

This message will not trigger push and desktop notifications.

Link copied to clipboard
override var tts: Boolean?

Whether this message should be played as a text-to-speech message.

Functions

Link copied to clipboard
inline fun MessageBuilder.actionRow(builder: ActionRowBuilder.() -> Unit)

Adds an action row configured by the builder to the components of the message.

Link copied to clipboard
open fun addFile(name: String, contentProvider: ChannelProvider): NamedFile

Adds a file with name and contentProvider to files.

Link copied to clipboard
inline fun MessageBuilder.addFile(name: String, contentProvider: ChannelProvider, builder: AttachmentBuilder.() -> Unit): NamedFile

Adds a file with name and contentProvider to files.

inline fun MessageBuilder.addFile(path: Path, builder: AttachmentBuilder.() -> Unit): NamedFile

Adds a file with the given path to files.

Link copied to clipboard

Configures the mentions in the message that are allowed to trigger a ping.

Link copied to clipboard
inline fun MessageBuilder.embed(builder: EmbedBuilder.() -> Unit)

Adds an embed configured by builder to the embeds of the message.

Link copied to clipboard

Sets the flags for the message.

Link copied to clipboard
Link copied to clipboard