DiscordPartialMessage

constructor(id: Snowflake, channelId: Snowflake, guildId: OptionalSnowflake = OptionalSnowflake.Missing, author: Optional<DiscordUser> = Optional.Missing(), member: Optional<DiscordGuildMember> = Optional.Missing(), content: Optional<String> = Optional.Missing(), timestamp: Optional<Instant> = Optional.Missing(), editedTimestamp: Optional<Instant?> = Optional.Missing(), tts: OptionalBoolean = OptionalBoolean.Missing, mentionEveryone: OptionalBoolean = OptionalBoolean.Missing, mentions: Optional<List<DiscordOptionallyMemberUser>> = Optional.Missing(), mentionRoles: Optional<List<Snowflake>> = Optional.Missing(), mentionedChannels: Optional<List<DiscordMentionedChannel>> = Optional.Missing(), attachments: Optional<List<DiscordAttachment>> = Optional.Missing(), embeds: Optional<List<DiscordEmbed>> = Optional.Missing(), reactions: Optional<List<Reaction>> = Optional.Missing(), nonce: Optional<String> = Optional.Missing(), pinned: OptionalBoolean = OptionalBoolean.Missing, webhookId: OptionalSnowflake = OptionalSnowflake.Missing, type: Optional<MessageType> = Optional.Missing(), activity: Optional<MessageActivity> = Optional.Missing(), application: Optional<MessageApplication> = Optional.Missing(), messageReference: Optional<DiscordMessageReference> = Optional.Missing(), flags: Optional<MessageFlags> = Optional.Missing(), stickers: Optional<List<DiscordStickerItem>> = Optional.Missing(), referencedMessage: Optional<DiscordMessage?> = Optional.Missing(), interaction: Optional<DiscordMessageInteraction> = Optional.Missing(), position: OptionalInt = OptionalInt.Missing)(source)

Parameters

id

id of the message.

channelId

id of the channel the message was sent in.

guildId

id of the guild the message was sent in.

author

The author of this message.

The author is only a valid user in the case where the message is generated by a user or bot user.

If the message is generated by a webhook, the author object corresponds to the webhook's DiscordWebhook.id, DiscordWebhook.name, and DiscordWebhook.avatar. You can tell if a message is generated by a webhook by checking for the webhookId on the message object.

member

Member properties for this message's author.

It only exists in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels.

content

Contents of the message.

editedTimestamp

When this message was edited, null if never.

tts

Whether this was a text-to-speech message.

mentionEveryone

Whether this message mentions everyone.

mentions

Users specifically mentioned in the message.

mentionRoles

Roles specifically mentioned in this message.

mentionedChannels

Channels specifically mentioned in this message.

Not all channel mentions in a message will appear in mentionedChannels:

  • Only textual channels that are visible to everyone in a lurkable guild will ever be included.

  • Only crossposted messages (via Channel Following) currently include mentionedChannels at all.

If no mentions in the message meet these requirements, this field will not be sent.

attachments

Any attached files.

embeds

Any embedded content.

reactions

reactions to the message.

nonce

Used for validating a message was sent.

pinned

Whether this message is pinned.

webhookId

If the message is generated by a webhook, this is the webhook's id.

type

Type of message.

activity

Sent with Rich Presence-related chat embeds.

application

Sent with Rich Presence-related chat embeds.

messageReference

Reference data sent with crossposted messages and replies.

flags

Message flags.

stickers

The stickers sent with the message (bots currently can only receive messages with stickers, not send).

referencedMessage

the message associated with messageReference.