Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllDiscordEvents = []Event{ EventChannelCreate, EventChannelDelete, EventChannelPinsUpdate, EventChannelUpdate, EventConnect, EventDisconnect, EventGuildBanAdd, EventGuildBanRemove, EventGuildCreate, EventGuildDelete, EventGuildEmojisUpdate, EventGuildIntegrationsUpdate, EventGuildMemberAdd, EventGuildMemberRemove, EventGuildMemberUpdate, EventGuildMembersChunk, EventGuildRoleCreate, EventGuildRoleDelete, EventGuildRoleUpdate, EventGuildUpdate, EventMessageAck, EventMessageCreate, EventMessageDelete, EventMessageDeleteBulk, EventMessageReactionAdd, EventMessageReactionRemove, EventMessageReactionRemoveAll, EventMessageUpdate, EventPresenceUpdate, EventPresencesReplace, EventRateLimit, EventReady, EventRelationshipAdd, EventRelationshipRemove, EventResumed, EventTypingStart, EventUserGuildSettingsUpdate, EventUserNoteUpdate, EventUserSettingsUpdate, EventUserUpdate, EventVoiceServerUpdate, EventVoiceStateUpdate, }
View Source
var AllEvents = []Event{ EventNewGuild, EventAll, EventAllPre, EventAllPost, EventMemberFetched, EventChannelCreate, EventChannelDelete, EventChannelPinsUpdate, EventChannelUpdate, EventConnect, EventDisconnect, EventGuildBanAdd, EventGuildBanRemove, EventGuildCreate, EventGuildDelete, EventGuildEmojisUpdate, EventGuildIntegrationsUpdate, EventGuildMemberAdd, EventGuildMemberRemove, EventGuildMemberUpdate, EventGuildMembersChunk, EventGuildRoleCreate, EventGuildRoleDelete, EventGuildRoleUpdate, EventGuildUpdate, EventMessageAck, EventMessageCreate, EventMessageDelete, EventMessageDeleteBulk, EventMessageReactionAdd, EventMessageReactionRemove, EventMessageReactionRemoveAll, EventMessageUpdate, EventPresenceUpdate, EventPresencesReplace, EventRateLimit, EventReady, EventRelationshipAdd, EventRelationshipRemove, EventResumed, EventTypingStart, EventUserGuildSettingsUpdate, EventUserNoteUpdate, EventUserSettingsUpdate, EventUserUpdate, EventVoiceServerUpdate, EventVoiceStateUpdate, }
View Source
var EventNames = []string{
"NewGuild",
"All",
"AllPre",
"AllPost",
"MemberFetched",
"ChannelCreate",
"ChannelDelete",
"ChannelPinsUpdate",
"ChannelUpdate",
"Connect",
"Disconnect",
"GuildBanAdd",
"GuildBanRemove",
"GuildCreate",
"GuildDelete",
"GuildEmojisUpdate",
"GuildIntegrationsUpdate",
"GuildMemberAdd",
"GuildMemberRemove",
"GuildMemberUpdate",
"GuildMembersChunk",
"GuildRoleCreate",
"GuildRoleDelete",
"GuildRoleUpdate",
"GuildUpdate",
"MessageAck",
"MessageCreate",
"MessageDelete",
"MessageDeleteBulk",
"MessageReactionAdd",
"MessageReactionRemove",
"MessageReactionRemoveAll",
"MessageUpdate",
"PresenceUpdate",
"PresencesReplace",
"RateLimit",
"Ready",
"RelationshipAdd",
"RelationshipRemove",
"Resumed",
"TypingStart",
"UserGuildSettingsUpdate",
"UserNoteUpdate",
"UserSettingsUpdate",
"UserUpdate",
"VoiceServerUpdate",
"VoiceStateUpdate",
}
Functions ¶
func HandleEvent ¶
func NumHandlers ¶
Types ¶
type Event ¶
type Event int
const ( EventNewGuild Event = 0 EventAll Event = 1 EventAllPre Event = 2 EventAllPost Event = 3 EventMemberFetched Event = 4 EventChannelCreate Event = 5 EventChannelDelete Event = 6 EventChannelPinsUpdate Event = 7 EventChannelUpdate Event = 8 EventConnect Event = 9 EventDisconnect Event = 10 EventGuildBanAdd Event = 11 EventGuildBanRemove Event = 12 EventGuildCreate Event = 13 EventGuildDelete Event = 14 EventGuildEmojisUpdate Event = 15 EventGuildIntegrationsUpdate Event = 16 EventGuildMemberAdd Event = 17 EventGuildMemberRemove Event = 18 EventGuildMemberUpdate Event = 19 EventGuildMembersChunk Event = 20 EventGuildRoleCreate Event = 21 EventGuildRoleDelete Event = 22 EventGuildRoleUpdate Event = 23 EventGuildUpdate Event = 24 EventMessageAck Event = 25 EventMessageCreate Event = 26 EventMessageDelete Event = 27 EventMessageDeleteBulk Event = 28 EventMessageReactionAdd Event = 29 EventMessageReactionRemove Event = 30 EventMessageReactionRemoveAll Event = 31 EventMessageUpdate Event = 32 EventPresenceUpdate Event = 33 EventPresencesReplace Event = 34 EventRateLimit Event = 35 EventReady Event = 36 EventRelationshipAdd Event = 37 EventRelationshipRemove Event = 38 EventResumed Event = 39 EventTypingStart Event = 40 EventUserGuildSettingsUpdate Event = 41 EventUserNoteUpdate Event = 42 EventUserSettingsUpdate Event = 43 EventUserUpdate Event = 44 EventVoiceServerUpdate Event = 45 EventVoiceStateUpdate Event = 46 )
type EventData ¶
type EventData struct { *EventDataContainer EvtInterface interface{} Type Event // contains filtered or unexported fields }
type EventDataContainer ¶
type EventDataContainer struct { ChannelCreate *discordgo.ChannelCreate ChannelDelete *discordgo.ChannelDelete ChannelPinsUpdate *discordgo.ChannelPinsUpdate ChannelUpdate *discordgo.ChannelUpdate Connect *discordgo.Connect Disconnect *discordgo.Disconnect GuildBanAdd *discordgo.GuildBanAdd GuildBanRemove *discordgo.GuildBanRemove GuildCreate *discordgo.GuildCreate GuildDelete *discordgo.GuildDelete GuildEmojisUpdate *discordgo.GuildEmojisUpdate GuildIntegrationsUpdate *discordgo.GuildIntegrationsUpdate GuildMemberAdd *discordgo.GuildMemberAdd GuildMemberRemove *discordgo.GuildMemberRemove GuildMemberUpdate *discordgo.GuildMemberUpdate GuildMembersChunk *discordgo.GuildMembersChunk GuildRoleCreate *discordgo.GuildRoleCreate GuildRoleDelete *discordgo.GuildRoleDelete GuildRoleUpdate *discordgo.GuildRoleUpdate GuildUpdate *discordgo.GuildUpdate MessageAck *discordgo.MessageAck MessageCreate *discordgo.MessageCreate MessageDelete *discordgo.MessageDelete MessageDeleteBulk *discordgo.MessageDeleteBulk MessageReactionAdd *discordgo.MessageReactionAdd MessageReactionRemove *discordgo.MessageReactionRemove MessageReactionRemoveAll *discordgo.MessageReactionRemoveAll MessageUpdate *discordgo.MessageUpdate PresenceUpdate *discordgo.PresenceUpdate PresencesReplace *discordgo.PresencesReplace RateLimit *discordgo.RateLimit Ready *discordgo.Ready RelationshipAdd *discordgo.RelationshipAdd RelationshipRemove *discordgo.RelationshipRemove Resumed *discordgo.Resumed TypingStart *discordgo.TypingStart UserGuildSettingsUpdate *discordgo.UserGuildSettingsUpdate UserNoteUpdate *discordgo.UserNoteUpdate UserSettingsUpdate *discordgo.UserSettingsUpdate UserUpdate *discordgo.UserUpdate VoiceServerUpdate *discordgo.VoiceServerUpdate VoiceStateUpdate *discordgo.VoiceStateUpdate Session *discordgo.Session }
type Handler ¶
type Handler func(evtData *EventData)
var (
ConcurrentAfter *Handler
)
func AddHandler ¶
AddHandler adds a event handler
func AddHandlerBefore ¶
AddHandlerBefore adds a handler to be called before another handler
func AddHandlerFirst ¶
AddHandlerFirst adds a handler first in the queue
Click to show internal directories.
Click to hide internal directories.