diff --git a/gateway/event_methods.go b/gateway/event_methods.go index a2fd61f..1bb2e70 100644 --- a/gateway/event_methods.go +++ b/gateway/event_methods.go @@ -40,6 +40,7 @@ func init() { func() ws.Event { return new(GuildMemberRemoveEvent) }, func() ws.Event { return new(GuildMemberUpdateEvent) }, func() ws.Event { return new(GuildMembersChunkEvent) }, + func() ws.Event { return new(GuildMemberListUpdateEvent) }, func() ws.Event { return new(GuildRoleCreateEvent) }, func() ws.Event { return new(GuildRoleUpdateEvent) }, func() ws.Event { return new(GuildRoleDeleteEvent) }, @@ -284,6 +285,12 @@ func (*GuildMembersChunkEvent) Op() ws.OpCode { return dispatchOp } // EventType implements Event. func (*GuildMembersChunkEvent) EventType() ws.EventType { return "GUILD_MEMBERS_CHUNK" } +// Op implements Event. It always returns 0. +func (*GuildMemberListUpdateEvent) Op() ws.OpCode { return dispatchOp } + +// EventType implements Event. +func (*GuildMemberListUpdateEvent) EventType() ws.EventType { return "GUILD_MEMBER_LIST_UPDATE" } + // Op implements Event. It always returns 0. func (*GuildRoleCreateEvent) Op() ws.OpCode { return dispatchOp } diff --git a/gateway/events.go b/gateway/events.go index a14eca5..07d7716 100644 --- a/gateway/events.go +++ b/gateway/events.go @@ -390,10 +390,10 @@ type GuildMembersChunkEvent struct { Nonce string `json:"nonce,omitempty"` } -// GuildMemberListUpdate is a dispatch event. It is an undocumented event. It's -// received when the client sends over GuildSubscriptions with the Channels -// field used. The State package does not handle this event. -type GuildMemberListUpdate struct { +// GuildMemberListUpdateEvent is a dispatch event. It is an undocumented event. +// It's received when the client sends over GuildSubscriptions with the Channels +// field used. The State package does not handle this event. +type GuildMemberListUpdateEvent struct { ID string `json:"id"` GuildID discord.GuildID `json:"guild_id"` MemberCount uint64 `json:"member_count"`