跳转至

消息动作

send_message 发送消息

字段名 数据类型 默认值 说明
detail_type string - 发送的类型,可以为 privatechannel,和消息事件detail_type 字段对应
guild_id string - 私聊临时频道 ID,当 detail_typeprivate 时必须传入
channel_id string - 子频道 ID,当 detail_typechannel 时必须传入
message message - 消息内容
event_id string - 事件 ID,当发送被动消息时必须传入
字段名 数据类型 说明
message_id string 消息 ID
time float64 消息成功发出的时间(Unix 时间戳),单位:秒
{
    "action": "send_message",
    "params": {
        "detail_type": "channel",
        "channel_id": "12467",
        "message": [
            {
                "type": "text",
                "data": {
                    "text": "我是文字巴拉巴拉巴拉"
                }
            }
        ],
        "event_id": "11111"
    }
}
{
    "status": "ok",
    "retcode": 0,
    "data": {
        "message_id": "2452352435",
        "time": 1632847927.599013
    },
    "message": ""
}

create_dms 创建私信会话

字段名 数据类型 默认值 说明
user_id string - 用户 ID
src_guild_id string - 源频道 ID
字段名 数据类型 说明
guild_id string 私信会话关联的临时频道 ID
channel_id string 私信会话关联的子频道 ID
create_time float64 创建私信会话时间(Unix 时间戳),单位:秒
{
    "action": "create_dms",
    "params": {
        "user_id": "11111",
        "src_guild_id": "12467",
    }
}
{
    "status": "ok",
    "retcode": 0,
    "data": {
        "guild_id": "2452352435",
        "channel_id": "233333333",
        "time": 1632847927.599013
    },
    "message": ""
}