Documentation ¶
Index ¶
- Variables
- func EmitEvent(data *EventData, evt Event)
- func HandleEvent(s *discordgo.Session, evt interface{})
- func NumHandlers(evt Event) int
- type Event
- type EventData
- func (data *EventData) ChannelCreate() *discordgo.ChannelCreate
- func (data *EventData) ChannelDelete() *discordgo.ChannelDelete
- func (data *EventData) ChannelPinsUpdate() *discordgo.ChannelPinsUpdate
- func (data *EventData) ChannelUpdate() *discordgo.ChannelUpdate
- func (data *EventData) Connect() *discordgo.Connect
- func (e *EventData) Context() context.Context
- func (data *EventData) Disconnect() *discordgo.Disconnect
- func (data *EventData) GuildBanAdd() *discordgo.GuildBanAdd
- func (data *EventData) GuildBanRemove() *discordgo.GuildBanRemove
- func (data *EventData) GuildCreate() *discordgo.GuildCreate
- func (data *EventData) GuildDelete() *discordgo.GuildDelete
- func (data *EventData) GuildEmojisUpdate() *discordgo.GuildEmojisUpdate
- func (data *EventData) GuildIntegrationsUpdate() *discordgo.GuildIntegrationsUpdate
- func (data *EventData) GuildMemberAdd() *discordgo.GuildMemberAdd
- func (data *EventData) GuildMemberRemove() *discordgo.GuildMemberRemove
- func (data *EventData) GuildMemberUpdate() *discordgo.GuildMemberUpdate
- func (data *EventData) GuildMembersChunk() *discordgo.GuildMembersChunk
- func (data *EventData) GuildRoleCreate() *discordgo.GuildRoleCreate
- func (data *EventData) GuildRoleDelete() *discordgo.GuildRoleDelete
- func (data *EventData) GuildRoleUpdate() *discordgo.GuildRoleUpdate
- func (data *EventData) GuildUpdate() *discordgo.GuildUpdate
- func (data *EventData) MessageAck() *discordgo.MessageAck
- func (data *EventData) MessageCreate() *discordgo.MessageCreate
- func (data *EventData) MessageDelete() *discordgo.MessageDelete
- func (data *EventData) MessageDeleteBulk() *discordgo.MessageDeleteBulk
- func (data *EventData) MessageReactionAdd() *discordgo.MessageReactionAdd
- func (data *EventData) MessageReactionRemove() *discordgo.MessageReactionRemove
- func (data *EventData) MessageReactionRemoveAll() *discordgo.MessageReactionRemoveAll
- func (data *EventData) MessageUpdate() *discordgo.MessageUpdate
- func (data *EventData) PresenceUpdate() *discordgo.PresenceUpdate
- func (data *EventData) PresencesReplace() *discordgo.PresencesReplace
- func (data *EventData) RateLimit() *discordgo.RateLimit
- func (data *EventData) Ready() *discordgo.Ready
- func (data *EventData) RelationshipAdd() *discordgo.RelationshipAdd
- func (data *EventData) RelationshipRemove() *discordgo.RelationshipRemove
- func (data *EventData) Resumed() *discordgo.Resumed
- func (data *EventData) TypingStart() *discordgo.TypingStart
- func (data *EventData) UserGuildSettingsUpdate() *discordgo.UserGuildSettingsUpdate
- func (data *EventData) UserNoteUpdate() *discordgo.UserNoteUpdate
- func (data *EventData) UserSettingsUpdate() *discordgo.UserSettingsUpdate
- func (data *EventData) UserUpdate() *discordgo.UserUpdate
- func (data *EventData) VoiceServerUpdate() *discordgo.VoiceServerUpdate
- func (data *EventData) VoiceStateUpdate() *discordgo.VoiceStateUpdate
- func (e *EventData) WithContext(ctx context.Context) *EventData
- type Handler
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 { EvtInterface interface{} Type Event Session *discordgo.Session // contains filtered or unexported fields }
func (*EventData) ChannelCreate ¶ added in v1.4.1
func (data *EventData) ChannelCreate() *discordgo.ChannelCreate
func (*EventData) ChannelDelete ¶ added in v1.4.1
func (data *EventData) ChannelDelete() *discordgo.ChannelDelete
func (*EventData) ChannelPinsUpdate ¶ added in v1.4.1
func (data *EventData) ChannelPinsUpdate() *discordgo.ChannelPinsUpdate
func (*EventData) ChannelUpdate ¶ added in v1.4.1
func (data *EventData) ChannelUpdate() *discordgo.ChannelUpdate
func (*EventData) Disconnect ¶ added in v1.4.1
func (data *EventData) Disconnect() *discordgo.Disconnect
func (*EventData) GuildBanAdd ¶ added in v1.4.1
func (data *EventData) GuildBanAdd() *discordgo.GuildBanAdd
func (*EventData) GuildBanRemove ¶ added in v1.4.1
func (data *EventData) GuildBanRemove() *discordgo.GuildBanRemove
func (*EventData) GuildCreate ¶ added in v1.4.1
func (data *EventData) GuildCreate() *discordgo.GuildCreate
func (*EventData) GuildDelete ¶ added in v1.4.1
func (data *EventData) GuildDelete() *discordgo.GuildDelete
func (*EventData) GuildEmojisUpdate ¶ added in v1.4.1
func (data *EventData) GuildEmojisUpdate() *discordgo.GuildEmojisUpdate
func (*EventData) GuildIntegrationsUpdate ¶ added in v1.4.1
func (data *EventData) GuildIntegrationsUpdate() *discordgo.GuildIntegrationsUpdate
func (*EventData) GuildMemberAdd ¶ added in v1.4.1
func (data *EventData) GuildMemberAdd() *discordgo.GuildMemberAdd
func (*EventData) GuildMemberRemove ¶ added in v1.4.1
func (data *EventData) GuildMemberRemove() *discordgo.GuildMemberRemove
func (*EventData) GuildMemberUpdate ¶ added in v1.4.1
func (data *EventData) GuildMemberUpdate() *discordgo.GuildMemberUpdate
func (*EventData) GuildMembersChunk ¶ added in v1.4.1
func (data *EventData) GuildMembersChunk() *discordgo.GuildMembersChunk
func (*EventData) GuildRoleCreate ¶ added in v1.4.1
func (data *EventData) GuildRoleCreate() *discordgo.GuildRoleCreate
func (*EventData) GuildRoleDelete ¶ added in v1.4.1
func (data *EventData) GuildRoleDelete() *discordgo.GuildRoleDelete
func (*EventData) GuildRoleUpdate ¶ added in v1.4.1
func (data *EventData) GuildRoleUpdate() *discordgo.GuildRoleUpdate
func (*EventData) GuildUpdate ¶ added in v1.4.1
func (data *EventData) GuildUpdate() *discordgo.GuildUpdate
func (*EventData) MessageAck ¶ added in v1.4.1
func (data *EventData) MessageAck() *discordgo.MessageAck
func (*EventData) MessageCreate ¶ added in v1.4.1
func (data *EventData) MessageCreate() *discordgo.MessageCreate
func (*EventData) MessageDelete ¶ added in v1.4.1
func (data *EventData) MessageDelete() *discordgo.MessageDelete
func (*EventData) MessageDeleteBulk ¶ added in v1.4.1
func (data *EventData) MessageDeleteBulk() *discordgo.MessageDeleteBulk
func (*EventData) MessageReactionAdd ¶ added in v1.4.1
func (data *EventData) MessageReactionAdd() *discordgo.MessageReactionAdd
func (*EventData) MessageReactionRemove ¶ added in v1.4.1
func (data *EventData) MessageReactionRemove() *discordgo.MessageReactionRemove
func (*EventData) MessageReactionRemoveAll ¶ added in v1.4.1
func (data *EventData) MessageReactionRemoveAll() *discordgo.MessageReactionRemoveAll
func (*EventData) MessageUpdate ¶ added in v1.4.1
func (data *EventData) MessageUpdate() *discordgo.MessageUpdate
func (*EventData) PresenceUpdate ¶ added in v1.4.1
func (data *EventData) PresenceUpdate() *discordgo.PresenceUpdate
func (*EventData) PresencesReplace ¶ added in v1.4.1
func (data *EventData) PresencesReplace() *discordgo.PresencesReplace
func (*EventData) RelationshipAdd ¶ added in v1.4.1
func (data *EventData) RelationshipAdd() *discordgo.RelationshipAdd
func (*EventData) RelationshipRemove ¶ added in v1.4.1
func (data *EventData) RelationshipRemove() *discordgo.RelationshipRemove
func (*EventData) TypingStart ¶ added in v1.4.1
func (data *EventData) TypingStart() *discordgo.TypingStart
func (*EventData) UserGuildSettingsUpdate ¶ added in v1.4.1
func (data *EventData) UserGuildSettingsUpdate() *discordgo.UserGuildSettingsUpdate
func (*EventData) UserNoteUpdate ¶ added in v1.4.1
func (data *EventData) UserNoteUpdate() *discordgo.UserNoteUpdate
func (*EventData) UserSettingsUpdate ¶ added in v1.4.1
func (data *EventData) UserSettingsUpdate() *discordgo.UserSettingsUpdate
func (*EventData) UserUpdate ¶ added in v1.4.1
func (data *EventData) UserUpdate() *discordgo.UserUpdate
func (*EventData) VoiceServerUpdate ¶ added in v1.4.1
func (data *EventData) VoiceServerUpdate() *discordgo.VoiceServerUpdate
func (*EventData) VoiceStateUpdate ¶ added in v1.4.1
func (data *EventData) VoiceStateUpdate() *discordgo.VoiceStateUpdate
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.