跳到主要内容

get_messages

获取指定聊天室的指定类型的消息

声明

array get_messages(object conn, string chat_type, string room_id, int start_id = 0, int count = -1)

参数

参数名描述
conn数据库客户端连接对象(通过ChatD.assure_connection获得)
chat_type消息类型
private_chat - 私聊消息
world_chat - 世界频道消息
user_chat - 留言消息
chatroom_chat - 聊天室消息
room_id聊天室ID
start_id获取的起始消息ID(消息ID大于start_id值的消息才会被获取,默认为0)
count获取的消息数量(-1表示获取所有消息,默认为-1)

返回值

使用方式

返回文档