频道相关事件列表

事件格式说明:请查看 [事件结构/格式说明]\

频道内用户添加 reaction

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 added_reaction
body Map
» msg_id string 用户点击的消息 id
» user_id string 点击的用户
» channel_id string 频道 id
» emoji Map 消息对象, 包含 id 表情 id, name 表情名称

示例

  1. {
  2. "s": 0,
  3. "d": {
  4. "channel_type": "GROUP",
  5. "type": 255,
  6. "target_id": "60163800000000",
  7. "author_id": "1",
  8. "content": "[系统消息]",
  9. "extra": {
  10. "type": "added_reaction",
  11. "body": {
  12. "channel_id": "5823400000000",
  13. "emoji": {
  14. "id": "[#128226;]",
  15. "name": "[#128226;]"
  16. },
  17. "user_id": "2418000000",
  18. "msg_id": "59def270-xxxx-xxxx-xxxx-8db935e054a1"
  19. }
  20. },
  21. "msg_id": "xxxx-xxxx-xxxx",
  22. "msg_timestamp": 1612703779612,
  23. "nonce": "",
  24. "verify_token": "xxxx"
  25. },
  26. "sn": 1
  27. }

频道内用户取消 reaction

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 deleted_reaction
body Map
» msg_id string 用户点击的消息 id
» user_id string 点击的用户
» channel_id string 频道 id
» emoji Map 消息对象, 包含 id 表情 id, name 表情名称

示例:

  1. {
  2. "s": 0,
  3. "d": {
  4. "channel_type": "GROUP",
  5. "type": 255,
  6. "target_id": "60163800000000",
  7. "author_id": "1",
  8. "content": "[系统消息]",
  9. "extra": {
  10. "type": "deleted_reaction",
  11. "body": {
  12. "channel_id": "5823400000000",
  13. "emoji": {
  14. "id": "[#128226;]",
  15. "name": "[#128226;]"
  16. },
  17. "user_id": "2418000000",
  18. "msg_id": "59def270-xxxx-xxxx-xxxx-8db935e054a1"
  19. }
  20. },
  21. "msg_id": "abd87680-xxxx-xxxx-xxxx-a56107a48e12",
  22. "msg_timestamp": 1612703776899,
  23. "nonce": "",
  24. "verify_token": "xxxx"
  25. },
  26. "sn": 1
  27. }

#

频道消息更新

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 updated_message
body Map
» msg_id string 被更新的消息的 id
» content string 更新后的文本
» channel_id string 频道 id
» mention array 提及的用户 id 组成的列表
» mention_all boolean 是否提及 全体成员
» mention_here boolean 是否提及 在线成员
» mention_roles array 提及的角色 id 组成的列表
» updated_at int 更新时间戳(毫秒)

示例:

  1. {
  2. "s": 0,
  3. "d": {
  4. "channel_type": "GROUP",
  5. "type": 255,
  6. "target_id": "60163899100000",
  7. "author_id": "1",
  8. "content": "[系统消息]",
  9. "extra": {
  10. "type": "updated_message",
  11. "body": {
  12. "channel_id": "5823470000000",
  13. "content": "1aaaaaa",
  14. "mention": [],
  15. "mention_all": false,
  16. "mention_here": false,
  17. "mention_roles": [],
  18. "updated_at": 1612703810779,
  19. "msg_id": "59def270-xxx-8db935e054a1"
  20. }
  21. },
  22. "msg_id": "cc523bf1-xxx-88c31ebc9fba",
  23. "msg_timestamp": 1612703810791,
  24. "nonce": "",
  25. "verify_token": "xxx"
  26. },
  27. "sn": 3
  28. }

频道消息被删除

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 deleted_message
body Map
» msg_id string 被更新的消息的 id
» channel_id string 频道 id

示例:

  1. {
  2. "d": {
  3. "channel_type": "GROUP",
  4. "type": 255,
  5. "target_id": "60163000000",
  6. "author_id": "1",
  7. "content": "[系统消息]",
  8. "extra": {
  9. "type": "deleted_message",
  10. "body": {
  11. "channel_id": "58234000000",
  12. "msg_id": "59def270-xxxx-8db935e054a1"
  13. }
  14. },
  15. "msg_id": "63d6a934-xxxx-a1f02c255213",
  16. "msg_timestamp": 1612704007683,
  17. "nonce": "",
  18. "verify_token": "xxx"
  19. },
  20. "s": 0,
  21. "sn": 5
  22. }

#

新增频道

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 added_channel
body Map 参考对象-频道 Channel

示例:

  1. {
  2. "s": 0,
  3. "d": {
  4. "channel_type": "GROUP",
  5. "type": 255,
  6. "target_id": "6016389000000",
  7. "author_id": "1",
  8. "content": "[系统消息]",
  9. "extra": {
  10. "type": "added_channel",
  11. "body": {
  12. "id": "53002000000000",
  13. "name": "新的频道",
  14. "user_id": "2418239356",
  15. "guild_id": "6016389000000",
  16. "is_category": 0,
  17. "parent_id": "6016400000000000",
  18. "level": 12,
  19. "slow_mode": 0,
  20. "topic": "新的频道的说明",
  21. "type": 1,
  22. "permission_overwrites": [
  23. {
  24. "role_id": 0,
  25. "allow": 0,
  26. "deny": 0
  27. }
  28. ],
  29. "permission_users": [
  30. {
  31. "user": {
  32. "id": "0",
  33. "username": "花荣",
  34. "identify_num": "12",
  35. "online": true,
  36. "os": "Websocket",
  37. "status": 1,
  38. "avatar": "xxxx",
  39. "mobile_verified": true,
  40. "nickname": "test",
  41. "roles": [],
  42. "joined_at": 1602596021000,
  43. "active_time": 1612703344396
  44. },
  45. "allow": 0,
  46. "deny": 0
  47. }
  48. ],
  49. "permission_sync": 1
  50. }
  51. },
  52. "msg_id": "70b60e52-xxx-4e8d0a995b1a",
  53. "msg_timestamp": 1612776265417,
  54. "nonce": "",
  55. "verify_token": "xxx"
  56. },
  57. "sn": 21
  58. }

修改频道信息

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 updated_channel
body Map 参考对象-频道 Channel

示例

  1. {
  2. "s": 0,
  3. "d": {
  4. "channel_type": "GROUP",
  5. "type": 255,
  6. "target_id": "6016389000000",
  7. "author_id": "1",
  8. "content": "[系统消息]",
  9. "extra": {
  10. "type": "updated_channel",
  11. "body": {
  12. "id": "53002000000000",
  13. "name": "更新后的频道",
  14. "user_id": "2418239356",
  15. "guild_id": "6016389000000",
  16. "is_category": 0,
  17. "parent_id": "6016400000000000",
  18. "level": 12,
  19. "slow_mode": 0,
  20. "topic": "更新后的频道的说明",
  21. "type": 1,
  22. "permission_overwrites": [
  23. {
  24. "role_id": 0,
  25. "allow": 0,
  26. "deny": 0
  27. }
  28. ],
  29. "permission_users": [],
  30. "permission_sync": 1
  31. }
  32. },
  33. "msg_id": "70b60e52-xxx-4e8d0a995b1a",
  34. "msg_timestamp": 1612776265417,
  35. "nonce": "",
  36. "verify_token": "xxx"
  37. },
  38. "sn": 21
  39. }

删除频道

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 deleted_channel
body Map
» id string 被删掉的频道 id
» deleted_at int 删除时间(毫秒)

示例:

  1. {
  2. "s": 0,
  3. "d": {
  4. "channel_type": "GROUP",
  5. "type": 255,
  6. "target_id": "60163899100000000",
  7. "author_id": "1",
  8. "content": "[系统消息]",
  9. "extra": {
  10. "type": "deleted_channel",
  11. "body": {
  12. "id": "69972200000000",
  13. "deleted_at": 1612777405595
  14. }
  15. },
  16. "msg_id": "3968a7e3-xxxx-0c8bac275fb4",
  17. "msg_timestamp": 1612777238358,
  18. "nonce": "",
  19. "verify_token": "xxx"
  20. },
  21. "sn": 24
  22. }

新的频道置顶消息

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 pinned_message
body Map
» channel_id string 频道 id
» operator_id string 操作人 id
» msg_id string 被置顶的消息 id

示例:

  1. {
  2. "s": 0,
  3. "d": {
  4. "channel_type": "GROUP",
  5. "type": 255,
  6. "target_id": "xxx",
  7. "author_id": "1",
  8. "content": "[系统消息]",
  9. "extra": {
  10. "type": "pinned_message",
  11. "body": {
  12. "channel_id": "xxxx",
  13. "operator_id": "2418200000",
  14. "msg_id": "4d5ef7ae-xxxx-b03e57cdf2e9"
  15. }
  16. },
  17. "msg_id": "d2bad9e9-xxxx-265f74dc35bb",
  18. "msg_timestamp": 1614054656178,
  19. "nonce": "",
  20. "verify_token": "xxxx"
  21. },
  22. "sn": 196
  23. }

取消频道置顶消息

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 unpinned_message
body Map
» channel_id string 频道 id
» operator_id string 操作人 id
» msg_id string 被取消置顶的消息 id

示例:

  1. {
  2. "d": {
  3. "channel_type": "GROUP",
  4. "type": 255,
  5. "target_id": "xxx",
  6. "author_id": "1",
  7. "content": "[系统消息]",
  8. "extra": {
  9. "type": "unpinned_message",
  10. "body": {
  11. "channel_id": "xxxxx",
  12. "operator_id": "2418200000",
  13. "msg_id": "4d5ef7ae-xxxx-b03e57cdf2e9"
  14. }
  15. },
  16. "msg_id": "9b269469-xxxx-9e526ea8f7f0",
  17. "msg_timestamp": 1614054894618,
  18. "nonce": "",
  19. "verify_token": "xxxx"
  20. },
  21. "s": 0,
  22. "sn": 197
  23. }