Documentation ¶
Index ¶
- Variables
- func AddHandler(p common.Plugin, handler HandlerFunc, order Order, evts ...Event)
- func AddHandlerAsyncLast(p common.Plugin, handler HandlerFunc, evts ...Event)
- func AddHandlerAsyncLastLegacy(p common.Plugin, handler HandlerFuncLegacy, evts ...Event)
- func AddHandlerFirst(p common.Plugin, handler HandlerFunc, evts ...Event)
- func AddHandlerFirstLegacy(p common.Plugin, handler HandlerFuncLegacy, evts ...Event)
- func AddHandlerLegacy(p common.Plugin, handler HandlerFuncLegacy, order Order, evts ...Event)
- func AddHandlerSecond(p common.Plugin, handler HandlerFunc, evts ...Event)
- func AddHandlerSecondLegacy(p common.Plugin, handler HandlerFuncLegacy, evts ...Event)
- func EmitEvent(data *EventData, evt Event)
- func HandleEvent(s *discordgo.Session, evt interface{})
- func InitWorkers(totalShards int)
- func QueueEventNonDiscord(evtData *EventData)
- type Event
- type EventData
- func (data *EventData) ApplicationCommandCreate() *discordgo.ApplicationCommandCreate
- func (data *EventData) ApplicationCommandDelete() *discordgo.ApplicationCommandDelete
- func (data *EventData) ApplicationCommandUpdate() *discordgo.ApplicationCommandUpdate
- func (d *EventData) CS() *dstate.ChannelState
- func (e *EventData) Cancel()
- 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 (e *EventData) Clone() *EventData
- 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) GuildStickersUpdate() *discordgo.GuildStickersUpdate
- func (data *EventData) GuildUpdate() *discordgo.GuildUpdate
- func (e *EventData) HasFeatureFlag(flag string) bool
- func (data *EventData) InteractionCreate() *discordgo.InteractionCreate
- func (data *EventData) InviteCreate() *discordgo.InviteCreate
- func (data *EventData) InviteDelete() *discordgo.InviteDelete
- 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) MessageReactionRemoveEmoji() *discordgo.MessageReactionRemoveEmoji
- 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) StageInstanceCreate() *discordgo.StageInstanceCreate
- func (data *EventData) StageInstanceDelete() *discordgo.StageInstanceDelete
- func (data *EventData) StageInstanceUpdate() *discordgo.StageInstanceUpdate
- func (data *EventData) ThreadCreate() *discordgo.ThreadCreate
- func (data *EventData) ThreadDelete() *discordgo.ThreadDelete
- func (data *EventData) ThreadListSync() *discordgo.ThreadListSync
- func (data *EventData) ThreadMemberUpdate() *discordgo.ThreadMemberUpdate
- func (data *EventData) ThreadMembersUpdate() *discordgo.ThreadMembersUpdate
- func (data *EventData) ThreadUpdate() *discordgo.ThreadUpdate
- 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 (data *EventData) WebhooksUpdate() *discordgo.WebhooksUpdate
- func (e *EventData) WithContext(ctx context.Context) *EventData
- type Handler
- type HandlerFunc
- type HandlerFuncLegacy
- type Order
Constants ¶
This section is empty.
Variables ¶
var AllDiscordEvents = []Event{ EventApplicationCommandCreate, EventApplicationCommandDelete, EventApplicationCommandUpdate, EventChannelCreate, EventChannelDelete, EventChannelPinsUpdate, EventChannelUpdate, EventConnect, EventDisconnect, EventGuildBanAdd, EventGuildBanRemove, EventGuildCreate, EventGuildDelete, EventGuildEmojisUpdate, EventGuildIntegrationsUpdate, EventGuildMemberAdd, EventGuildMemberRemove, EventGuildMemberUpdate, EventGuildMembersChunk, EventGuildRoleCreate, EventGuildRoleDelete, EventGuildRoleUpdate, EventGuildStickersUpdate, EventGuildUpdate, EventInteractionCreate, EventInviteCreate, EventInviteDelete, EventMessageAck, EventMessageCreate, EventMessageDelete, EventMessageDeleteBulk, EventMessageReactionAdd, EventMessageReactionRemove, EventMessageReactionRemoveAll, EventMessageReactionRemoveEmoji, EventMessageUpdate, EventPresenceUpdate, EventPresencesReplace, EventRateLimit, EventReady, EventRelationshipAdd, EventRelationshipRemove, EventResumed, EventStageInstanceCreate, EventStageInstanceDelete, EventStageInstanceUpdate, EventThreadCreate, EventThreadDelete, EventThreadListSync, EventThreadMemberUpdate, EventThreadMembersUpdate, EventThreadUpdate, EventTypingStart, EventUserGuildSettingsUpdate, EventUserNoteUpdate, EventUserSettingsUpdate, EventUserUpdate, EventVoiceServerUpdate, EventVoiceStateUpdate, EventWebhooksUpdate, }
var AllEvents = []Event{ EventNewGuild, EventAll, EventAllPre, EventAllPost, EventMemberFetched, EventYagShardReady, EventYagShardsAdded, EventYagShardRemoved, EventApplicationCommandCreate, EventApplicationCommandDelete, EventApplicationCommandUpdate, EventChannelCreate, EventChannelDelete, EventChannelPinsUpdate, EventChannelUpdate, EventConnect, EventDisconnect, EventGuildBanAdd, EventGuildBanRemove, EventGuildCreate, EventGuildDelete, EventGuildEmojisUpdate, EventGuildIntegrationsUpdate, EventGuildMemberAdd, EventGuildMemberRemove, EventGuildMemberUpdate, EventGuildMembersChunk, EventGuildRoleCreate, EventGuildRoleDelete, EventGuildRoleUpdate, EventGuildStickersUpdate, EventGuildUpdate, EventInteractionCreate, EventInviteCreate, EventInviteDelete, EventMessageAck, EventMessageCreate, EventMessageDelete, EventMessageDeleteBulk, EventMessageReactionAdd, EventMessageReactionRemove, EventMessageReactionRemoveAll, EventMessageReactionRemoveEmoji, EventMessageUpdate, EventPresenceUpdate, EventPresencesReplace, EventRateLimit, EventReady, EventRelationshipAdd, EventRelationshipRemove, EventResumed, EventStageInstanceCreate, EventStageInstanceDelete, EventStageInstanceUpdate, EventThreadCreate, EventThreadDelete, EventThreadListSync, EventThreadMemberUpdate, EventThreadMembersUpdate, EventThreadUpdate, EventTypingStart, EventUserGuildSettingsUpdate, EventUserNoteUpdate, EventUserSettingsUpdate, EventUserUpdate, EventVoiceServerUpdate, EventVoiceStateUpdate, EventWebhooksUpdate, }
var DiscordState dstate.StateTracker
var EventNames = []string{
"NewGuild",
"All",
"AllPre",
"AllPost",
"MemberFetched",
"YagShardReady",
"YagShardsAdded",
"YagShardRemoved",
"ApplicationCommandCreate",
"ApplicationCommandDelete",
"ApplicationCommandUpdate",
"ChannelCreate",
"ChannelDelete",
"ChannelPinsUpdate",
"ChannelUpdate",
"Connect",
"Disconnect",
"GuildBanAdd",
"GuildBanRemove",
"GuildCreate",
"GuildDelete",
"GuildEmojisUpdate",
"GuildIntegrationsUpdate",
"GuildMemberAdd",
"GuildMemberRemove",
"GuildMemberUpdate",
"GuildMembersChunk",
"GuildRoleCreate",
"GuildRoleDelete",
"GuildRoleUpdate",
"GuildStickersUpdate",
"GuildUpdate",
"InteractionCreate",
"InviteCreate",
"InviteDelete",
"MessageAck",
"MessageCreate",
"MessageDelete",
"MessageDeleteBulk",
"MessageReactionAdd",
"MessageReactionRemove",
"MessageReactionRemoveAll",
"MessageReactionRemoveEmoji",
"MessageUpdate",
"PresenceUpdate",
"PresencesReplace",
"RateLimit",
"Ready",
"RelationshipAdd",
"RelationshipRemove",
"Resumed",
"StageInstanceCreate",
"StageInstanceDelete",
"StageInstanceUpdate",
"ThreadCreate",
"ThreadDelete",
"ThreadListSync",
"ThreadMemberUpdate",
"ThreadMembersUpdate",
"ThreadUpdate",
"TypingStart",
"UserGuildSettingsUpdate",
"UserNoteUpdate",
"UserSettingsUpdate",
"UserUpdate",
"VoiceServerUpdate",
"VoiceStateUpdate",
"WebhooksUpdate",
}
Functions ¶
func AddHandler ¶
func AddHandler(p common.Plugin, handler HandlerFunc, order Order, evts ...Event)
AddHandler adds a event handler
func AddHandlerAsyncLast ¶ added in v1.19.0
func AddHandlerAsyncLast(p common.Plugin, handler HandlerFunc, evts ...Event)
AddHandlerAsyncLast adds handlers using the OrderAsyncPostState order
func AddHandlerAsyncLastLegacy ¶ added in v1.20.0
func AddHandlerAsyncLastLegacy(p common.Plugin, handler HandlerFuncLegacy, evts ...Event)
AddHandlerAsyncLast adds handlers using the OrderAsyncPostState order
func AddHandlerFirst ¶
func AddHandlerFirst(p common.Plugin, handler HandlerFunc, evts ...Event)
AddHandlerFirst adds handlers using the OrderSyncPreState order
func AddHandlerFirstLegacy ¶ added in v1.20.0
func AddHandlerFirstLegacy(p common.Plugin, handler HandlerFuncLegacy, evts ...Event)
AddHandlerFirst adds handlers using the OrderSyncPreState order
func AddHandlerLegacy ¶ added in v1.20.0
func AddHandlerLegacy(p common.Plugin, handler HandlerFuncLegacy, order Order, evts ...Event)
AddHandler adds a event handler
func AddHandlerSecond ¶ added in v1.19.0
func AddHandlerSecond(p common.Plugin, handler HandlerFunc, evts ...Event)
AddHandlerSecond adds handlers using the OrderSyncPostState order
func AddHandlerSecondLegacy ¶ added in v1.20.0
func AddHandlerSecondLegacy(p common.Plugin, handler HandlerFuncLegacy, evts ...Event)
AddHandlerSecond adds handlers using the OrderSyncPostState order
func HandleEvent ¶
func HandleEvent(s *discordgo.Session, evt interface{})
func InitWorkers ¶ added in v1.20.0
func InitWorkers(totalShards int)
func QueueEventNonDiscord ¶ added in v1.22.2
func QueueEventNonDiscord(evtData *EventData)
Types ¶
type Event ¶
type Event int
const ( EventNewGuild Event = 0 EventAll Event = 1 EventAllPre Event = 2 EventAllPost Event = 3 EventMemberFetched Event = 4 EventYagShardReady Event = 5 EventYagShardsAdded Event = 6 EventYagShardRemoved Event = 7 EventApplicationCommandCreate Event = 8 EventApplicationCommandDelete Event = 9 EventApplicationCommandUpdate Event = 10 EventChannelCreate Event = 11 EventChannelDelete Event = 12 EventChannelPinsUpdate Event = 13 EventChannelUpdate Event = 14 EventConnect Event = 15 EventDisconnect Event = 16 EventGuildBanAdd Event = 17 EventGuildBanRemove Event = 18 EventGuildCreate Event = 19 EventGuildDelete Event = 20 EventGuildEmojisUpdate Event = 21 EventGuildIntegrationsUpdate Event = 22 EventGuildMemberAdd Event = 23 EventGuildMemberRemove Event = 24 EventGuildMemberUpdate Event = 25 EventGuildMembersChunk Event = 26 EventGuildRoleCreate Event = 27 EventGuildRoleDelete Event = 28 EventGuildRoleUpdate Event = 29 EventGuildStickersUpdate Event = 30 EventGuildUpdate Event = 31 EventInteractionCreate Event = 32 EventInviteCreate Event = 33 EventInviteDelete Event = 34 EventMessageAck Event = 35 EventMessageCreate Event = 36 EventMessageDelete Event = 37 EventMessageDeleteBulk Event = 38 EventMessageReactionAdd Event = 39 EventMessageReactionRemove Event = 40 EventMessageReactionRemoveAll Event = 41 EventMessageReactionRemoveEmoji Event = 42 EventMessageUpdate Event = 43 EventPresenceUpdate Event = 44 EventPresencesReplace Event = 45 EventRateLimit Event = 46 EventReady Event = 47 EventRelationshipAdd Event = 48 EventRelationshipRemove Event = 49 EventResumed Event = 50 EventStageInstanceCreate Event = 51 EventStageInstanceDelete Event = 52 EventStageInstanceUpdate Event = 53 EventThreadCreate Event = 54 EventThreadDelete Event = 55 EventThreadListSync Event = 56 EventThreadMemberUpdate Event = 57 EventThreadMembersUpdate Event = 58 EventThreadUpdate Event = 59 EventTypingStart Event = 60 EventUserGuildSettingsUpdate Event = 61 EventUserNoteUpdate Event = 62 EventUserSettingsUpdate Event = 63 EventUserUpdate Event = 64 EventVoiceServerUpdate Event = 65 EventVoiceStateUpdate Event = 66 EventWebhooksUpdate Event = 67 )
type EventData ¶
type EventData struct { EvtInterface interface{} Type Event Session *discordgo.Session GuildFeatureFlags []string GS *dstate.GuildSet // Guaranteed to be available for guild events, except creates and deletes // contains filtered or unexported fields }
func NewEventData ¶ added in v1.19.0
func (*EventData) ApplicationCommandCreate ¶ added in v1.30.0
func (data *EventData) ApplicationCommandCreate() *discordgo.ApplicationCommandCreate
func (*EventData) ApplicationCommandDelete ¶ added in v1.30.0
func (data *EventData) ApplicationCommandDelete() *discordgo.ApplicationCommandDelete
func (*EventData) ApplicationCommandUpdate ¶ added in v1.30.0
func (data *EventData) ApplicationCommandUpdate() *discordgo.ApplicationCommandUpdate
func (*EventData) CS ¶ added in v1.20.0
func (d *EventData) CS() *dstate.ChannelState
CS will attempt to fetch the channel state from either cached, or state, or return nil if nonexistent (e.g a channel create before the state has been populated by it)
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) GuildStickersUpdate ¶ added in v1.30.0
func (data *EventData) GuildStickersUpdate() *discordgo.GuildStickersUpdate
func (*EventData) GuildUpdate ¶ added in v1.4.1
func (data *EventData) GuildUpdate() *discordgo.GuildUpdate
func (*EventData) HasFeatureFlag ¶ added in v1.24.11
HasFeatureFlag returns true if the guild the event came from has the provided feature flag
func (*EventData) InteractionCreate ¶ added in v1.26.0
func (data *EventData) InteractionCreate() *discordgo.InteractionCreate
func (*EventData) InviteCreate ¶ added in v1.23.1
func (data *EventData) InviteCreate() *discordgo.InviteCreate
func (*EventData) InviteDelete ¶ added in v1.23.1
func (data *EventData) InviteDelete() *discordgo.InviteDelete
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) MessageReactionRemoveEmoji ¶ added in v1.30.0
func (data *EventData) MessageReactionRemoveEmoji() *discordgo.MessageReactionRemoveEmoji
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) RateLimit ¶ added in v1.4.1
func (data *EventData) RateLimit() *discordgo.RateLimit
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) StageInstanceCreate ¶ added in v1.30.0
func (data *EventData) StageInstanceCreate() *discordgo.StageInstanceCreate
func (*EventData) StageInstanceDelete ¶ added in v1.30.0
func (data *EventData) StageInstanceDelete() *discordgo.StageInstanceDelete
func (*EventData) StageInstanceUpdate ¶ added in v1.30.0
func (data *EventData) StageInstanceUpdate() *discordgo.StageInstanceUpdate
func (*EventData) ThreadCreate ¶ added in v1.30.0
func (data *EventData) ThreadCreate() *discordgo.ThreadCreate
func (*EventData) ThreadDelete ¶ added in v1.30.0
func (data *EventData) ThreadDelete() *discordgo.ThreadDelete
func (*EventData) ThreadListSync ¶ added in v1.30.0
func (data *EventData) ThreadListSync() *discordgo.ThreadListSync
func (*EventData) ThreadMemberUpdate ¶ added in v1.30.0
func (data *EventData) ThreadMemberUpdate() *discordgo.ThreadMemberUpdate
func (*EventData) ThreadMembersUpdate ¶ added in v1.30.0
func (data *EventData) ThreadMembersUpdate() *discordgo.ThreadMembersUpdate
func (*EventData) ThreadUpdate ¶ added in v1.30.0
func (data *EventData) ThreadUpdate() *discordgo.ThreadUpdate
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
func (*EventData) WebhooksUpdate ¶ added in v1.19.0
func (data *EventData) WebhooksUpdate() *discordgo.WebhooksUpdate
type Handler ¶
type Handler struct { Plugin common.Plugin F HandlerFunc FLegacy HandlerFuncLegacy }
type HandlerFunc ¶ added in v1.20.0
func RequireCSMW ¶ added in v1.20.0
func RequireCSMW(inner HandlerFunc) HandlerFunc
RequireCSMW will only call the inner handler if a channel state is available
type HandlerFuncLegacy ¶ added in v1.20.0
type HandlerFuncLegacy func(evtData *EventData)
type Order ¶ added in v1.19.0
type Order int
const ( // Ran first, syncrounously, before changes from the event is applied to state OrderSyncPreState Order = 0 // Ran second, syncrounsly, after state changes have been applied OrderSyncPostState Order = 1 // Ran last, asyncrounously, most handlers should use this unless you need something else in special circumstances OrderAsyncPostState Order = 2 )