Message

@Serializable
data class Message(val id: String, val channelId: String, val guildId: String? = null, val author: User, val partialMember: GuildMember? = null, val content: String, val sentAt: String, val editedAt: String?, val isTTS: Boolean, val mentionsEveryone: Boolean, val usersMentioned: List<User> = emptyList(), val rolesIdsMentioned: List<String> = emptyList(), val attachments: List<Attachment> = emptyList(), val embeds: List<Embed> = emptyList(), val reactions: List<Reaction> = emptyList(), val validationNonce: String? = null, val isPinned: Boolean, val webhookId: String? = null, val type: MessageType, val activity: MessageActivity? = null, val application: MessageApplication? = null, val reference: MessageReference? = null, val flags: Int? = null, val interaction: MessageInteraction? = null, val thread: Channel? = null, val components: List<MessageComponent> = emptyList(), val stickerList: List<PartialSticker> = emptyList())(source)

Constructors

Link copied to clipboard
constructor(id: String, channelId: String, guildId: String? = null, author: User, partialMember: GuildMember? = null, content: String, sentAt: String, editedAt: String?, isTTS: Boolean, mentionsEveryone: Boolean, usersMentioned: List<User> = emptyList(), rolesIdsMentioned: List<String> = emptyList(), attachments: List<Attachment> = emptyList(), embeds: List<Embed> = emptyList(), reactions: List<Reaction> = emptyList(), validationNonce: String? = null, isPinned: Boolean, webhookId: String? = null, type: MessageType, activity: MessageActivity? = null, application: MessageApplication? = null, reference: MessageReference? = null, flags: Int? = null, interaction: MessageInteraction? = null, thread: Channel? = null, components: List<MessageComponent> = emptyList(), stickerList: List<PartialSticker> = emptyList())

Properties

Link copied to clipboard
@SerialName(value = "activity")
val activity: MessageActivity? = null
Link copied to clipboard
@SerialName(value = "application")
val application: MessageApplication? = null
Link copied to clipboard
@SerialName(value = "attachments")
val attachments: List<Attachment>
Link copied to clipboard
@SerialName(value = "author")
val author: User
Link copied to clipboard

Shortcut to get the User.id of the Message.author.

Link copied to clipboard
@SerialName(value = "channel_id")
val channelId: String
Link copied to clipboard
@SerialName(value = "components")
val components: List<MessageComponent>
Link copied to clipboard
@SerialName(value = "content")
val content: String
Link copied to clipboard
@SerialName(value = "edited_timestamp")
val editedAt: String?
Link copied to clipboard
@SerialName(value = "embeds")
val embeds: List<Embed>
Link copied to clipboard
@SerialName(value = "flags")
val flags: Int? = null
Link copied to clipboard
@SerialName(value = "guild_id")
val guildId: String? = null
Link copied to clipboard
@SerialName(value = "id")
val id: String
Link copied to clipboard
@SerialName(value = "interaction")
val interaction: MessageInteraction? = null
Link copied to clipboard

Shortcut to check if a message is from a bot.

Link copied to clipboard

Shortcut to check if a message is from a user.

Link copied to clipboard

Shortcut to check if a message is from a webhook.

Link copied to clipboard
@SerialName(value = "pinned")
val isPinned: Boolean
Link copied to clipboard
@SerialName(value = "tts")
val isTTS: Boolean
Link copied to clipboard
@SerialName(value = "mention_everyone")
val mentionsEveryone: Boolean
Link copied to clipboard
@SerialName(value = "member")
val partialMember: GuildMember? = null
Link copied to clipboard
@SerialName(value = "reactions")
val reactions: List<Reaction>
Link copied to clipboard
@SerialName(value = "message_reference")
val reference: MessageReference? = null
Link copied to clipboard
@SerialName(value = "mention_roles")
val rolesIdsMentioned: List<String>
Link copied to clipboard
@SerialName(value = "timestamp")
val sentAt: String
Link copied to clipboard
@SerialName(value = "stickers_items")
val stickerList: List<PartialSticker>
Link copied to clipboard
@SerialName(value = "thread")
val thread: Channel? = null
Link copied to clipboard
@SerialName(value = "type")
val type: MessageType
Link copied to clipboard
@SerialName(value = "mentions")
val usersMentioned: List<User>
Link copied to clipboard
@SerialName(value = "nonce")
val validationNonce: String? = null
Link copied to clipboard
@SerialName(value = "webhook_id")
val webhookId: String? = null
Link copied to clipboard

Shortcut to get the Message.content split into words.