mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-02-09 04:57:13 +00:00
Add VoiceStates returned on GuildCreate and Ready to the state cache
This commit is contained in:
parent
9686a41539
commit
b6c167970a
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue