Remove unavailable goop, b1nzy says it'd never happen.
This commit is contained in:
parent
678756c9a9
commit
42cef0c0d0
1 changed files with 20 additions and 27 deletions
7
state.go
7
state.go
|
@ -99,12 +99,6 @@ func (s *State) GuildAdd(guild *Guild) error {
|
|||
}
|
||||
|
||||
if g, ok := s.guildMap[guild.ID]; ok {
|
||||
// The guild already exists in state.
|
||||
if guild.Unavailable {
|
||||
// If the new guild is unavailable, just update the `unavailable` property on the
|
||||
// current guild.
|
||||
g.Unavailable = guild.Unavailable
|
||||
} else {
|
||||
// We are about to replace `g` in the state with `guild`, but first we need to
|
||||
// make sure we preserve any fields that the `guild` doesn't contain from `g`.
|
||||
if guild.Roles == nil {
|
||||
|
@ -126,7 +120,6 @@ func (s *State) GuildAdd(guild *Guild) error {
|
|||
guild.VoiceStates = g.VoiceStates
|
||||
}
|
||||
*g = *guild
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue