Skip to content

Commit

Permalink
Early support for PresencesReplace
Browse files Browse the repository at this point in the history
  • Loading branch information
iopred committed Mar 19, 2016
1 parent 584b06a commit 6e56853
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var eventToInterface = map[string]interface{}{
"MESSAGE_UPDATE": MessageUpdate{},
"MESSAGE_DELETE": MessageDelete{},
"PRESENCE_UPDATE": PresenceUpdate{},
"PRESENCES_REPLACE": PresencesReplace{},
"READY": Ready{},
"USER_UPDATE": UserUpdate{},
"USER_SETTINGS_UPDATE": UserSettingsUpdate{},
Expand Down Expand Up @@ -129,6 +130,9 @@ type GuildRoleUpdate struct {
*GuildRole
}

// PresencesReplace is an array of Presences for an event.
type PresencesReplace []*Presence

// VoiceStateUpdate is a wrapper struct for an event.
type VoiceStateUpdate struct {
*VoiceState
Expand Down
2 changes: 1 addition & 1 deletion structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ type TypingStart struct {
Timestamp int `json:"timestamp"`
}

// A PresenceUpdate stores data for the pressence update websocket event.
// A PresenceUpdate stores data for the presence update websocket event.
type PresenceUpdate struct {
User *User `json:"user"`
Status string `json:"status"`
Expand Down

0 comments on commit 6e56853

Please sign in to comment.