forked from pothtonswer/discordmuffin
Add missing fields to Ready (#1227)
* feat(Ready): add shard and application fields Add missing Shard and Application fields to Ready event struct. * feat(Ready): make Shard pointer Make Shard field pointer to be consistent with the API.
This commit is contained in:
parent
0c2b0eccf4
commit
afab84009b
2 changed files with 12 additions and 10 deletions
|
@ -39,10 +39,10 @@ type Ready struct {
|
|||
Version int `json:"v"`
|
||||
SessionID string `json:"session_id"`
|
||||
User *User `json:"user"`
|
||||
Shard *[2]int `json:"shard"`
|
||||
Application *Application `json:"application"`
|
||||
Guilds []*Guild `json:"guilds"`
|
||||
PrivateChannels []*Channel `json:"private_channels"`
|
||||
|
||||
// TODO: Application and Shard
|
||||
}
|
||||
|
||||
// ChannelCreate is the data for a ChannelCreate event.
|
||||
|
|
2
state.go
2
state.go
|
@ -912,6 +912,8 @@ func (s *State) onReady(se *Session, r *Ready) (err error) {
|
|||
Version: r.Version,
|
||||
SessionID: r.SessionID,
|
||||
User: r.User,
|
||||
Shard: r.Shard,
|
||||
Application: r.Application,
|
||||
}
|
||||
|
||||
s.Ready = ready
|
||||
|
|
Loading…
Reference in a new issue