Cleanup before mailing.
This commit is contained in:
parent
4e23e5fc35
commit
b2ef55ae9c
2 changed files with 3 additions and 4 deletions
|
@ -356,9 +356,9 @@ type GuildBan struct {
|
||||||
GuildID string `json:"guild_id"`
|
GuildID string `json:"guild_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// A State contains the current known state, as discord sends this in a
|
// A State contains the current known state.
|
||||||
// READY blob, it seems reasonable to simply use that message type as the
|
// As discord sends this in a READY blob, it seems reasonable to simply
|
||||||
// data store.
|
// use that struct as the data store.
|
||||||
type State struct {
|
type State struct {
|
||||||
Ready
|
Ready
|
||||||
}
|
}
|
||||||
|
|
1
wsapi.go
1
wsapi.go
|
@ -238,7 +238,6 @@ func (s *Session) event(messageType int, message []byte) (err error) {
|
||||||
case "CHANNEL_CREATE":
|
case "CHANNEL_CREATE":
|
||||||
var st Channel
|
var st Channel
|
||||||
if err = unmarshalEvent(e, &st); err == nil {
|
if err = unmarshalEvent(e, &st); err == nil {
|
||||||
fmt.Println("channel create", st)
|
|
||||||
s.State.AddChannel(&st)
|
s.State.AddChannel(&st)
|
||||||
if s.OnChannelCreate != nil {
|
if s.OnChannelCreate != nil {
|
||||||
s.OnChannelCreate(s, st)
|
s.OnChannelCreate(s, st)
|
||||||
|
|
Loading…
Reference in a new issue