mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-02-10 13:33:14 +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
|
return *stack
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue