mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-12-01 03:03:48 +00:00
Ready
This commit is contained in:
parent
2dc983d243
commit
35cad7f640
|
@ -18,7 +18,6 @@ type State struct {
|
||||||
PreHandler *handler.Handler
|
PreHandler *handler.Handler
|
||||||
|
|
||||||
guilds []discord.Guild
|
guilds []discord.Guild
|
||||||
channels []discord.Channel
|
|
||||||
privates []discord.Channel
|
privates []discord.Channel
|
||||||
messages map[discord.Snowflake][]discord.Message
|
messages map[discord.Snowflake][]discord.Message
|
||||||
|
|
||||||
|
@ -55,8 +54,15 @@ func (s *State) hookSession() error {
|
||||||
s.PreHandler.Call(iface)
|
s.PreHandler.Call(iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.mut.Lock()
|
||||||
|
defer s.mut.Unlock()
|
||||||
|
|
||||||
switch ev := iface.(type) {
|
switch ev := iface.(type) {
|
||||||
case *gateway.ReadyEvent:
|
case *gateway.ReadyEvent:
|
||||||
|
// Override
|
||||||
|
s.guilds = ev.Guilds
|
||||||
|
s.privates = ev.PrivateChannels
|
||||||
|
|
||||||
case *gateway.MessageCreateEvent:
|
case *gateway.MessageCreateEvent:
|
||||||
_ = ev
|
_ = ev
|
||||||
panic("IMPLEMENT ME")
|
panic("IMPLEMENT ME")
|
||||||
|
|
Loading…
Reference in a new issue