Better event handling via DiscordGo's handlers

This commit is contained in:
Tyler
2020-06-19 22:50:55 -04:00
parent ba67bde994
commit c5910e7f5d
10 changed files with 560 additions and 65 deletions

View File

@ -88,7 +88,6 @@ func (t *TrackInfo) UnmarshalJSON(data []byte) error {
const (
opVoiceUpdate = "voiceUpdate"
opVoiceProcessed = "voiceProcessed"
opUserJoin = "userJoin"
opUserLeave = "userLeave"
opUserListen = "userListen"
@ -105,8 +104,16 @@ const (
eventTrackEnd = "TrackEndEvent"
eventTrackException = "TrackExceptionEvent"
eventTrackStuck = "TrackStuckEvent"
eventVoiceProcessed = "VoiceProcessedEvent"
)
// Exception is a message from the Lavalink server
type Exception struct {
Message string
Severity string
Cause string
}
// VoiceServerUpdate is a raw Discord VOICE_SERVER_UPDATE event
type VoiceServerUpdate struct {
GuildID string `json:"guild_id"`