mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-28 01:33:10 +00:00
Ready
This commit is contained in:
parent
2dc983d243
commit
35cad7f640
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue