Closed TeackReais closed 2 years ago
这个接口返回的数据示例
{
"message": {
"id": "",
"channel_id": "",
"guild_id": "",
"content": "",
"timestamp": "",
"author": {
"id": "",
"username": "",
"bot": true
},
"attachments": [
{
"id": "",
"url": "",
"filename": "",
"width": 0,
"height": 0,
"size": 0,
"content_type": "image/jpeg"
}
],
"mentions": [
{
"id": "",
"username": "",
"bot": false
}
],
"member": {
"roles": [
"0"
],
"joined_at": ""
}
}
}
dto.Message类型数据序列化示例
{
"id": "",
"channel_id": "",
"guild_id": "",
"content": "",
"timestamp": "",
"author": {
"id": "",
"username": "",
"bot": true
},
"attachments": [
{
"id": "",
"url": "",
"filename": "",
"width": 0,
"height": 0,
"size": 0,
"content_type": "image/jpeg"
}
],
"mentions": [
{
"id": "",
"username": "",
"bot": false
}
],
"member": {
"roles": [
"0"
],
"joined_at": ""
}
}
很明显这2块json代码的结构是不同的
GET /channels/{channel_id}/messages/{message_id} 经调试,接口实际上返回的数据是以下结构体序列化后的数据
因此以下接口实现函数返回的指针*dto.Message所指向的结构体不携带任何数据