Merge pull request #153 from iopred/develop

Early support for PresencesReplace. Closes #152
This commit is contained in:
Bruce 2016-03-19 23:30:51 -05:00
commit eb0c379869
2 changed files with 5 additions and 1 deletions

View file

@ -34,6 +34,7 @@ var eventToInterface = map[string]interface{}{
"MESSAGE_UPDATE": MessageUpdate{}, "MESSAGE_UPDATE": MessageUpdate{},
"MESSAGE_DELETE": MessageDelete{}, "MESSAGE_DELETE": MessageDelete{},
"PRESENCE_UPDATE": PresenceUpdate{}, "PRESENCE_UPDATE": PresenceUpdate{},
"PRESENCES_REPLACE": PresencesReplace{},
"READY": Ready{}, "READY": Ready{},
"USER_UPDATE": UserUpdate{}, "USER_UPDATE": UserUpdate{},
"USER_SETTINGS_UPDATE": UserSettingsUpdate{}, "USER_SETTINGS_UPDATE": UserSettingsUpdate{},
@ -129,6 +130,9 @@ type GuildRoleUpdate struct {
*GuildRole *GuildRole
} }
// PresencesReplace is an array of Presences for an event.
type PresencesReplace []*Presence
// VoiceStateUpdate is a wrapper struct for an event. // VoiceStateUpdate is a wrapper struct for an event.
type VoiceStateUpdate struct { type VoiceStateUpdate struct {
*VoiceState *VoiceState

View file

@ -298,7 +298,7 @@ type TypingStart struct {
Timestamp int `json:"timestamp"` 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 { type PresenceUpdate struct {
User *User `json:"user"` User *User `json:"user"`
Status string `json:"status"` Status string `json:"status"`