public class RawMessage extends Object implements SenderAndCidMidGetter, DeleteAble, Reactive, Pinsble, SenderV2
| 字段名 | 类型 | 描述 |
|---|---|---|
| id | string | 消息 id |
| channel_id | string | 子频道 id |
| guild_id | string | 频道 id |
| content | string | 消息内容 |
| timestamp | ISO8601 timestamp | 消息创建时间 |
| edited_timestamp | ISO8601 timestamp | 消息编辑时间 |
| mention_everyone | bool | 是否是@全员消息 |
| author | User 对象 | 消息创建者 |
| attachments | MessageAttachment 对象数组 | 附件 |
| embeds | MessageEmbed 对象数组 | embed |
| mentions | User 对象数组 | 消息中@的人 |
| member | Member 对象 | 消息创建者的member信息 |
| ark | MessageArk ark消息对象 | ark消息 |
| seq | int | 用于消息间的排序,seq 在同一子频道中按从先到后的顺序递增,不同的子频道之间消息无法排序。(目前只在消息事件中有值,2022年8月1日 后续废弃) |
| seq_in_channel | string | 子频道消息 seq,用于消息间的排序,seq 在同一子频道中按从先到后的顺序递增,不同的子频道之间消息无法排序 |
| message_reference | MessageReference 对象 | 引用消息对象 |
| src_guild_id | string | 用于私信场景下识别真实的来源频道id |
| Constructor and Description |
|---|
RawMessage() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEmoji(Emoji emoji) |
PinsMessage |
addPins() |
Object |
delete()
删除
|
void |
deletePins() |
String |
getCid()
获取 channel id
|
String |
getMid()
获取 message id
|
PinsMessage |
getPins() |
BaseV2 |
getV2() |
static void |
imagePrepare(Image msg,
Bot bot) |
void |
removeEmoji(Emoji emoji) |
Result<ActionResult> |
send(MessagePacket packet)
以自定义方式发送消息
|
Result<ActionResult> |
send(RawPreMessage msg)
自定义消息
|
Result |
send(SendAble msg)
以各种方式 达到想要发送的效果
|
Result |
send(String text)
以JSON方式发送文本消息
|
Result |
send(String text,
RawMessage message)
以JSON方式发送文本消息并引用指定消息
|
void |
setBot(Bot bot) |
String |
toString0() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEnvTypegetBotpublic Result send(String text, RawMessage message)
Senderpublic Result<ActionResult> send(MessagePacket packet)
Senderpublic Result<ActionResult> send(RawPreMessage msg)
Senderpublic Object delete()
DeleteAbledelete in interface DeleteAblepublic String getCid()
SenderAndCidMidGettergetCid in interface SenderAndCidMidGetterpublic String getMid()
SenderAndCidMidGettergetMid in interface SenderAndCidMidGetterpublic void removeEmoji(Emoji emoji)
removeEmoji in interface Reactivepublic void setBot(Bot bot)
setBot in interface BotContentpublic PinsMessage addPins()
public void deletePins()
deletePins in interface Pinsblepublic PinsMessage getPins()
public String toString0()
Copyright © 2024. All rights reserved.