1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-28 01:33:10 +00:00
This commit is contained in:
diamondburned 2020-01-17 14:36:53 -08:00
parent 2dc983d243
commit 35cad7f640

View file

@ -18,7 +18,6 @@ type State struct {
PreHandler *handler.Handler
guilds []discord.Guild
channels []discord.Channel
privates []discord.Channel
messages map[discord.Snowflake][]discord.Message
@ -55,8 +54,15 @@ func (s *State) hookSession() error {
s.PreHandler.Call(iface)
}
s.mut.Lock()
defer s.mut.Unlock()
switch ev := iface.(type) {
case *gateway.ReadyEvent:
// Override
s.guilds = ev.Guilds
s.privates = ev.PrivateChannels
case *gateway.MessageCreateEvent:
_ = ev
panic("IMPLEMENT ME")