浏览代码

Added some undocumented fields to ready event

jonas747 8 年之前
父节点
当前提交
4906a4cf9c
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      structs.go

+ 13 - 0
structs.go

@@ -277,6 +277,19 @@ type Ready struct {
 	ReadState         []*ReadState  `json:"read_state"`
 	PrivateChannels   []*Channel    `json:"private_channels"`
 	Guilds            []*Guild      `json:"guilds"`
+
+	// Undocumented fields
+	Settings          *Settings            `json:"user_settings"`
+	UserGuildSettings []*UserGuildSettings `json:"user_guild_settings"`
+	Relationships     []*Relationship      `json:"relationships"`
+	Presences         []*Presence          `json:"presences"`
+}
+
+// A Relationship between the current user and this user
+type Relationship struct {
+	User *User  `json:"user"`
+	Type int    `json:"type"` // ?
+	Id   string `json:"id"`   // Seems to be same as the User.ID?
 }
 
 // A RateLimit struct holds information related to a specific rate limit.