1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-15 19:33:17 +00:00
arikawa/state/events.go
Maximilian von Lindern de3d0e2160
Gateway: Split GuildCreateEvent (#116)
* Session: fix event handler loop not getting properly closed

* Implement #113

* Session: move guild events to state

* Session: close hStop
2020-06-06 13:47:15 -07:00

43 lines
1.2 KiB
Go

package state
import "github.com/diamondburned/arikawa/gateway"
// events that originated from GuildCreate:
type (
// GuildReady gets fired for every guild the bot/user is in, as found in
// the Ready event.
//
// Guilds that are unavailable when connecting, will not trigger a
// GuildReadyEvent, until they become available again.
GuildReadyEvent struct {
*gateway.GuildCreateEvent
}
// GuildAvailableEvent gets fired when a guild becomes available again,
// after being previously declared unavailable through a
// GuildUnavailableEvent. This event will not be fired for guilds that
// were already unavailable when connecting to the gateway.
GuildAvailableEvent struct {
*gateway.GuildCreateEvent
}
// GuildJoinEvent gets fired if the bot/user joins a guild.
GuildJoinEvent struct {
*gateway.GuildCreateEvent
}
)
// events that originated from GuildDelete:
type (
// GuildLeaveEvent gets fired if the bot/user left a guild, was removed
// or the owner deleted the guild.
GuildLeaveEvent struct {
*gateway.GuildDeleteEvent
}
// GuildUnavailableEvent gets fired if a guild becomes unavailable.
GuildUnavailableEvent struct {
*gateway.GuildDeleteEvent
}
)