From 6e568533b26724ffc33d67c1b66e0ce10bbefe23 Mon Sep 17 00:00:00 2001 From: Chris Rhodes Date: Sat, 19 Mar 2016 16:22:36 -0700 Subject: [PATCH] Early support for PresencesReplace --- events.go | 4 ++++ structs.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/events.go b/events.go index 4efe722..dc087bf 100644 --- a/events.go +++ b/events.go @@ -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{}, @@ -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 diff --git a/structs.go b/structs.go index d7a83bd..460a190 100644 --- a/structs.go +++ b/structs.go @@ -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"`