This repository has been archived by the owner on Dec 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
events.go
75 lines (69 loc) · 3.6 KB
/
events.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package plugapi
// This file contains borrowed code from
// https://github.com/go-playground/webhooks/blob/v1/webhooks.go
// Event defines a Plug Event type
type Event int
// Refer to bottom of file for a list of all the events
// ProcessPayloadFunc is a common function for payload return values
type ProcessPayloadFunc func(plug *PlugDJ, payload interface{})
func (plug *PlugDJ) emitEvent(event Event, payload interface{}) {
fn := plug.eventFuncs[event]
if fn != nil {
go fn(plug, payload)
}
}
// List of Event types
const (
AdvanceEvent Event = iota // = "advance"
BanEvent // = "ban"
BoothLockedEvent // = "boothLocked"
ChatEvent // = "chat"
ChatCommandEvent // = "command"
ChatDeleteEvent // = "chatDelete"
ChatLevelUpdateEvent // = "roomMinChatLevelUpdate"
CommandEvent // = "command"
DJListCycleEvent // = "djListCycle"
DJListUpdateEvent // = "djListUpdate"
DJListLockedEvent // = "djListLocked"
EarnEvent // = "earn"
FollowJoinEvent // = "followJoin"
FloodChatEvent // = "floodChat"
FriendRequestEvent // = "friendRequest"
GiftedEvent // = "gifted"
GrabEvent // = "grab"
KillSessionEvent // = "killSession"
MaintModeEvent // = "plugMaintenance"
MaintModeAlertEvent // = "plugMaintenanceAlert"
ModerateAddDjEvent // = "modAddDJ"
ModerateAddWaitlistEvent // = "modAddWaitList"
ModerateAmbassadorEvent // = "modAmbassador"
ModerateBanEvent // = "modBan"
ModerateMoveDjEvent // = "modMoveDJ"
ModerateMuteEvent // = "modMute"
ModerateRemoveDjEvent // = "modRemoveDJ"
ModerateRemoveWaitlistEvent // = "modRemoveWaitList"
ModerateSkipEvent // = "modSkip"
ModerateStaffEvent // = "modStaff"
NotifyEvent // = "notify"
PdjMessageEvent // = "pdjMessage"
PdjUpdateEvent // = "pdjUpdate"
PingEvent // = "ping"
PlaylistCycleEvent // = "playlistCycle"
RequestDurationEvent // = "requestDuration"
RequestDurationRetryEvent // = "requestDurationRetry"
RoomChangeEvent // = "roomChanged"
RoomDescriptionUpdateEvent // = "roomDescriptionUpdate"
RoomJoinEvent // = "roomJoin"
RoomNameUpdateEvent // = "roomNameUpdate"
RoomVoteSkipEvent // = "roomVoteSkip"
RoomWelcomeUpdateEvent // = "roomWelcomeUpdate"
SessionCloseEvent // = "sessionClose"
SkipEvent // = "skip"
StrobeToggleEvent // = "strobeToggle"
UserCounterUpdateEvent // = "userCounterUpdate"
UserFollowEvent // = "userFollow"
UserJoinEvent // = "userJoin"
UserLeaveEvent // = "userLeave"
UserUpdateEvent // = "userUpdate"
VoteEvent // = "vote"
)