Message

data class Message(val id: String, val channelId: String, val guildId: String, val content: String, val timestamp: String, val editedTimestamp: String? = null, val mentionEveryone: Boolean = false, val author: User, val attachments: List<Message.Attachment> = emptyList(), val embeds: List<Message.Embed> = emptyList(), val mentions: List<User> = emptyList(), val member: MessageMember? = null, val ark: Message.Ark? = null, val seqInChannel: String, val messageReference: Message.Reference? = null, val srcGuildId: String? = null)(source)

消息对象(Message)

消息对象的完整定义。

Constructors

Link copied to clipboard
constructor(id: String, channelId: String, guildId: String, content: String, timestamp: String, editedTimestamp: String? = null, mentionEveryone: Boolean = false, author: User, attachments: List<Message.Attachment> = emptyList(), embeds: List<Message.Embed> = emptyList(), mentions: List<User> = emptyList(), member: MessageMember? = null, ark: Message.Ark? = null, seqInChannel: String, messageReference: Message.Reference? = null, srcGuildId: String? = null)

Types

Link copied to clipboard
data class Ark(val templateId: String, val kv: List<Message.Ark.Kv> = emptyList())
Link copied to clipboard
data class Attachment(val url: String, val properties: Map<String, String> = emptyMap())
Link copied to clipboard
data class Embed(val title: String, val prompt: String, val thumbnail: Message.Embed.Thumbnail? = null, val fields: List<Message.Embed.Field> = emptyList())
Link copied to clipboard
data class Markdown(val templateId: Int? = null, val customTemplateId: String? = null, val params: Message.Markdown.Params? = null, val content: String? = null)
Link copied to clipboard
data class Reference(val messageId: String, val ignoreGetMessageError: Boolean = false)

Properties

Link copied to clipboard
val ark: Message.Ark? = null

ark消息对象 ark消息

Link copied to clipboard

MessageAttachment 对象数组 附件

Link copied to clipboard

消息创建者

Link copied to clipboard
@SerialName(value = "channel_id")
val channelId: String

子频道 id

Link copied to clipboard

消息内容

Link copied to clipboard
@SerialName(value = "edited_timestamp")
val editedTimestamp: String? = null

ISO8601 timestamp 消息编辑时间

Link copied to clipboard

embeds MessageEmbed 对象数组 embed

Link copied to clipboard
@SerialName(value = "guild_id")
val guildId: String

频道 id

Link copied to clipboard
val id: String

消息 id

Link copied to clipboard
val member: MessageMember? = null

Member 对象 消息创建者的member信息

Link copied to clipboard
@SerialName(value = "mention_everyone")
val mentionEveryone: Boolean = false

是否是@全员消息

Link copied to clipboard

User 对象数组 消息中@的人

Link copied to clipboard
@SerialName(value = "message_reference")
val messageReference: Message.Reference? = null

引用消息对象

Link copied to clipboard
@SerialName(value = "seq_in_channel")
val seqInChannel: String

seq_in_channel string

Link copied to clipboard
@SerialName(value = "src_guild_id")
val srcGuildId: String? = null

用于私信场景下识别真实的来源频道id

Link copied to clipboard

ISO8601 timestamp 消息创建时间