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:
Bruce Marriner 2016-04-08 11:51:58 -05:00
parent 6101abeb27
commit 92c27c7712
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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