Because binzy was too lazy.
No seriously, this allows us see if a guild is actually being created or just being lazy-loaded.
This commit is contained in:
parent
6101abeb27
commit
92c27c7712
2 changed files with 2 additions and 2 deletions
2
state.go
2
state.go
|
@ -66,7 +66,7 @@ func (s *State) GuildAdd(guild *Guild) error {
|
|||
for i, g := range s.Guilds {
|
||||
if g.ID == guild.ID {
|
||||
// If this guild already exists with data, don't stomp on props
|
||||
if !g.Unavailable {
|
||||
if g.Unavailable != nil && !*g.Unavailable {
|
||||
guild.Members = g.Members
|
||||
guild.Presences = g.Presences
|
||||
guild.Channels = g.Channels
|
||||
|
|
|
@ -178,7 +178,7 @@ type Guild struct {
|
|||
Presences []*Presence `json:"presences"`
|
||||
Channels []*Channel `json:"channels"`
|
||||
VoiceStates []*VoiceState `json:"voice_states"`
|
||||
Unavailable bool `json:"unavailable"`
|
||||
Unavailable *bool `json:"unavailable"`
|
||||
}
|
||||
|
||||
// A GuildParams stores all the data needed to update discord guild settings
|
||||
|
|
Loading…
Reference in a new issue