服务器角色相关事件

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

服务器角色增加

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 added_role
body Map 参考对象-角色 Role

示例:

  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": "added_role",
  11. "body": {
  12. "role_id": 11111,
  13. "name": "新角色",
  14. "color": 0,
  15. "position": 5,
  16. "hoist": 0,
  17. "mentionable": 0,
  18. "permissions": 142924296
  19. }
  20. },
  21. "msg_id": "c804a6a6-xxxx-e041ec3bb887",
  22. "msg_timestamp": 1613998615411,
  23. "nonce": "",
  24. "verify_token": "xxxx"
  25. },
  26. "sn": 186
  27. }

服务器角色删除

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 deleted_role
body Map 参考对象-角色 Role

示例:

  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": "deleted_role",
  11. "body": {
  12. "role_id": 11111,
  13. "name": "新角色",
  14. "color": 0,
  15. "position": 5,
  16. "hoist": 0,
  17. "mentionable": 0,
  18. "permissions": 142924296
  19. }
  20. },
  21. "msg_id": "61f1dc5a-xxxx-47776deacd0c",
  22. "msg_timestamp": 1614054458292,
  23. "nonce": "",
  24. "verify_token": "xxx"
  25. },
  26. "sn": 192
  27. }

服务器角色更新

extra 字段说明:

字段 类型 说明
type string 消息的类型,本处为 updated_role
body Map 参考对象-角色 Role

示例:

  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": "updated_role",
  11. "body": {
  12. "role_id": 599,
  13. "name": "新角色xxx",
  14. "color": 0,
  15. "position": 6,
  16. "hoist": 0,
  17. "mentionable": 0,
  18. "permissions": 142924316
  19. }
  20. },
  21. "msg_id": "a1071327-xxxx-8fec42ae74bd",
  22. "msg_timestamp": 1614054560619,
  23. "nonce": "",
  24. "verify_token": "xxx"
  25. },
  26. "sn": 194
  27. }