Add VoiceStates returned on GuildCreate and Ready to the state cache

This commit is contained in:
Matthew Penner 2020-04-18 20:34:25 -06:00
parent 9686a41539
commit b6c167970a
1 changed files with 7 additions and 0 deletions

View File

@ -346,6 +346,13 @@ func handleGuildCreate(store Store, guild *gateway.GuildCreateEvent) []error {
}
}
// Handle guild voice states
for i := range guild.VoiceStates {
if err := store.VoiceStateSet(guild.ID, &guild.VoiceStates[i]); err != nil {
error(err, "Failed to set guild voice state in Ready")
}
}
return *stack
}