Preview deployment

class MessagePayload

export class MessagePayload

Represents a message to be sent to the API.

Constructors

constructor()

Body sendable to the API

files : RawFile[] | null

Files sendable to the API

readonly
isInteraction : boolean

Whether or not the target is an BaseInteraction or an InteractionWebhook

readonly
isMessage : boolean

Whether or not the target is a Message

readonly
isMessageManager : boolean

Whether or not the target is a MessageManager

readonly
isUser : boolean

Whether or not the target is a User

readonly
isWebhook : boolean

Whether or not the target is a Webhook or a WebhookClient

The payload of this message.

target : MessageTarget

The target for this message to be sent to

Creates a MessagePayload from user-level arguments.

makeContent() : string | undefined

Makes the content of this message.

resolveBody() : this

Resolves the body.

Resolves a single file into an object sendable to the API.

resolveFiles() : Promise<this>

Resolves files.