Documentation
¶
Index ¶
- func HandleRawEvent(bot *core.Bot, gatewayEventType discord.GatewayEventType, sequenceNumber int, ...) io.Reader
- type ApplicationCommandInteractionEvent
- type AutocompleteInteractionEvent
- type ComponentInteractionEvent
- type DMChannelCreateEvent
- type DMChannelDeleteEvent
- type DMChannelPinsUpdateEvent
- type DMChannelUpdateEvent
- type DMMessageCreateEvent
- type DMMessageDeleteEvent
- type DMMessageReactionAddEvent
- type DMMessageReactionRemoveAllEvent
- type DMMessageReactionRemoveEmojiEvent
- type DMMessageReactionRemoveEvent
- type DMMessageUpdateEvent
- type DMUserTypingStartEvent
- type DisconnectedEvent
- type EmojiCreateEvent
- type EmojiDeleteEvent
- type EmojiUpdateEvent
- type GenericDMChannelEvent
- type GenericDMMessageEvent
- type GenericDMMessageReactionEvent
- type GenericEmojiEvent
- type GenericEvent
- type GenericGuildChannelEvent
- type GenericGuildEvent
- type GenericGuildInviteEvent
- type GenericGuildMemberEvent
- type GenericGuildMessageEvent
- type GenericGuildMessageReactionEvent
- type GenericGuildScheduledEventEvent
- type GenericGuildScheduledEventUserEvent
- type GenericGuildVoiceEvent
- type GenericIntegrationEvent
- type GenericMessageEvent
- type GenericReactionEvent
- type GenericRoleEvent
- type GenericStageInstanceEvent
- type GenericStickerEvent
- type GenericThreadEvent
- type GenericThreadMemberEvent
- type GenericUserActivityEvent
- type GenericUserEvent
- type GuildAvailableEvent
- type GuildBanEvent
- type GuildChannelCreateEvent
- type GuildChannelDeleteEvent
- type GuildChannelPinsUpdateEvent
- type GuildChannelUpdateEvent
- type GuildIntegrationsUpdateEvent
- type GuildInviteCreateEvent
- type GuildInviteDeleteEvent
- type GuildJoinEvent
- type GuildLeaveEvent
- type GuildMemberJoinEvent
- type GuildMemberLeaveEvent
- type GuildMemberTypingStartEvent
- type GuildMemberUpdateEvent
- type GuildMessageCreateEvent
- type GuildMessageDeleteEvent
- type GuildMessageReactionAddEvent
- type GuildMessageReactionRemoveAllEvent
- type GuildMessageReactionRemoveEmojiEvent
- type GuildMessageReactionRemoveEvent
- type GuildMessageUpdateEvent
- type GuildReadyEvent
- type GuildScheduledEventCreateEvent
- type GuildScheduledEventDeleteEvent
- type GuildScheduledEventUpdateEvent
- type GuildScheduledEventUserAddEvent
- type GuildScheduledEventUserRemoveEvent
- type GuildUnavailableEvent
- type GuildUnbanEvent
- type GuildUpdateEvent
- type GuildVoiceJoinEvent
- type GuildVoiceLeaveEvent
- type GuildVoiceMoveEvent
- type GuildVoiceStateUpdateEvent
- type GuildsReadyEvent
- type HTTPRequestEvent
- type HeartbeatEvent
- type IntegrationCreateEvent
- type IntegrationDeleteEvent
- type IntegrationUpdateEvent
- type InteractionEvent
- type InvalidSessionEvent
- type ListenerAdapter
- type MessageCreateEvent
- type MessageDeleteEvent
- type MessageReactionAddEvent
- type MessageReactionRemoveAllEvent
- type MessageReactionRemoveEmojiEvent
- type MessageReactionRemoveEvent
- type MessageUpdateEvent
- type RawEvent
- type ReadyEvent
- type ResumedEvent
- type RoleCreateEvent
- type RoleDeleteEvent
- type RoleUpdateEvent
- type SelfUpdateEvent
- type StageInstanceCreateEvent
- type StageInstanceDeleteEvent
- type StageInstanceUpdateEvent
- type StickerCreateEvent
- type StickerDeleteEvent
- type StickerUpdateEvent
- type ThreadCreateEvent
- type ThreadDeleteEvent
- type ThreadHideEvent
- type ThreadMemberAddEvent
- type ThreadMemberRemoveEvent
- type ThreadMemberUpdateEvent
- type ThreadShowEvent
- type ThreadUpdateEvent
- type UserActivityStartEvent
- type UserActivityStopEvent
- type UserActivityUpdateEvent
- type UserClientStatusUpdateEvent
- type UserStatusUpdateEvent
- type UserTypingStartEvent
- type UserUpdateEvent
- type VoiceServerUpdateEvent
- type WebhooksUpdateEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplicationCommandInteractionEvent ¶ added in v0.6.9
type ApplicationCommandInteractionEvent struct {
*GenericEvent
*core.ApplicationCommandInteraction
}
type AutocompleteInteractionEvent ¶ added in v0.6.9
type AutocompleteInteractionEvent struct {
*GenericEvent
*core.AutocompleteInteraction
}
type ComponentInteractionEvent ¶ added in v0.6.9
type ComponentInteractionEvent struct {
*GenericEvent
*core.ComponentInteraction
}
type DMChannelCreateEvent ¶
type DMChannelCreateEvent struct {
*GenericDMChannelEvent
}
DMChannelCreateEvent indicates that a new core.DMChannel got created
type DMChannelDeleteEvent ¶
type DMChannelDeleteEvent struct {
*GenericDMChannelEvent
}
DMChannelDeleteEvent indicates that a core.DMChannel got deleted
type DMChannelUpdateEvent ¶
type DMChannelUpdateEvent struct {
*GenericDMChannelEvent
OldChannel *core.DMChannel
}
DMChannelUpdateEvent indicates that a core.DMChannel got updated
type DMMessageCreateEvent ¶
type DMMessageCreateEvent struct {
*GenericDMMessageEvent
}
DMMessageCreateEvent is called upon receiving a core.Message in a Channel (requires discord.GatewayIntentsDirectMessage)
type DMMessageDeleteEvent ¶
type DMMessageDeleteEvent struct {
*GenericDMMessageEvent
}
DMMessageDeleteEvent is called upon deleting a core.Message in a Channel (requires discord.GatewayIntentsDirectMessage)
type DMMessageReactionAddEvent ¶
type DMMessageReactionAddEvent struct {
*GenericDMMessageReactionEvent
}
DMMessageReactionAddEvent indicates that a core.User added a discord.MessageReaction to a core.Message in a Channel (requires the discord.GatewayIntentDirectMessageReactions)
type DMMessageReactionRemoveAllEvent ¶
type DMMessageReactionRemoveAllEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
}
DMMessageReactionRemoveAllEvent indicates someone removed all discord.MessageReaction(s) from a core.Message in a Channel (requires the discord.GatewayIntentDirectMessageReactions)
type DMMessageReactionRemoveEmojiEvent ¶
type DMMessageReactionRemoveEmojiEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
Emoji discord.ReactionEmoji
}
DMMessageReactionRemoveEmojiEvent indicates someone removed all discord.MessageReaction(s) of a specific core.Emoji from a core.Message in a Channel (requires the discord.GatewayIntentDirectMessageReactions)
type DMMessageReactionRemoveEvent ¶
type DMMessageReactionRemoveEvent struct {
*GenericDMMessageReactionEvent
}
DMMessageReactionRemoveEvent indicates that a core.User removed a discord.MessageReaction from a core.Message in a Channel (requires the discord.GatewayIntentDirectMessageReactions)
type DMMessageUpdateEvent ¶
type DMMessageUpdateEvent struct {
*GenericDMMessageEvent
OldMessage *core.Message
}
DMMessageUpdateEvent is called upon editing a core.Message in a Channel (requires discord.GatewayIntentsDirectMessage)
type DMUserTypingStartEvent ¶ added in v0.6.8
type DMUserTypingStartEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
UserID snowflake.Snowflake
Timestamp time.Time
}
DMUserTypingStartEvent indicates that a core.User started typing in a core.DMChannel(requires discord.GatewayIntentDirectMessageTyping)
func (DMUserTypingStartEvent) Channel ¶ added in v0.6.8
func (e DMUserTypingStartEvent) Channel() *core.DMChannel
Channel returns the core.DMChannel the DMUserTypingStartEvent happened in
type DisconnectedEvent ¶
type DisconnectedEvent struct {
*GenericEvent
}
DisconnectedEvent indicates disgo disconnected from the gateway.Gateway
type EmojiCreateEvent ¶
type EmojiCreateEvent struct {
*GenericEmojiEvent
}
EmojiCreateEvent indicates that a new core.Emoji got created in a core.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type EmojiDeleteEvent ¶
type EmojiDeleteEvent struct {
*GenericEmojiEvent
}
EmojiDeleteEvent indicates that a core.Emoji got deleted in a core.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type EmojiUpdateEvent ¶
type EmojiUpdateEvent struct {
*GenericEmojiEvent
OldEmoji *core.Emoji
}
EmojiUpdateEvent indicates that a core.Emoji got updated in a core.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type GenericDMChannelEvent ¶
type GenericDMChannelEvent struct {
*GenericEvent
Channel *core.DMChannel
ChannelID snowflake.Snowflake
}
GenericDMChannelEvent is called upon receiving DMChannelCreateEvent, DMChannelUpdateEvent, DMChannelDeleteEvent or DMUserTypingStartEvent
type GenericDMMessageEvent ¶
type GenericDMMessageEvent struct {
*GenericEvent
MessageID snowflake.Snowflake
Message *core.Message
ChannelID snowflake.Snowflake
}
GenericDMMessageEvent is called upon receiving DMMessageCreateEvent, DMMessageUpdateEvent, DMMessageDeleteEvent, GenericDMMessageReactionEvent, DMMessageReactionAddEvent, DMMessageReactionRemoveEvent, DMMessageReactionRemoveEmojiEvent or DMMessageReactionRemoveAllEvent (requires discord.GatewayIntentsDirectMessage)
func (GenericDMMessageEvent) Channel ¶
func (e GenericDMMessageEvent) Channel() *core.DMChannel
Channel returns the Channel the GenericDMMessageEvent happened in
type GenericDMMessageReactionEvent ¶
type GenericDMMessageReactionEvent struct {
*GenericEvent
UserID snowflake.Snowflake
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
Emoji discord.ReactionEmoji
}
GenericDMMessageReactionEvent is called upon receiving DMMessageReactionAddEvent or DMMessageReactionRemoveEvent (requires the discord.GatewayIntentDirectMessageReactions)
func (*GenericDMMessageReactionEvent) User ¶
func (e *GenericDMMessageReactionEvent) User() *core.User
User returns the User who owns the discord.MessageReaction. This will only check cached users!
type GenericEmojiEvent ¶
type GenericEmojiEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Emoji *core.Emoji
}
GenericEmojiEvent is called upon receiving EmojiCreateEvent, EmojiUpdateEvent or EmojiDeleteEvent (requires discord.GatewayIntentGuildEmojisAndStickers)
type GenericEvent ¶
type GenericEvent struct {
// contains filtered or unexported fields
}
GenericEvent the base event structure
func NewGenericEvent ¶
func NewGenericEvent(bot *core.Bot, sequenceNumber int) *GenericEvent
NewGenericEvent constructs a new GenericEvent with the provided Bot instance
func (GenericEvent) Bot ¶
func (e GenericEvent) Bot() *core.Bot
func (GenericEvent) SequenceNumber ¶
func (e GenericEvent) SequenceNumber() int
SequenceNumber returns the sequence number of the gateway event
type GenericGuildChannelEvent ¶
type GenericGuildChannelEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
Channel core.GuildChannel
GuildID snowflake.Snowflake
}
GenericGuildChannelEvent is called upon receiving GuildChannelCreateEvent, GuildChannelUpdateEvent or GuildChannelDeleteEvent
func (GenericGuildChannelEvent) Guild ¶
func (e GenericGuildChannelEvent) Guild() *core.Guild
Guild returns the core.Guild the event happened in. This will only check cached guilds!
type GenericGuildEvent ¶
type GenericGuildEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Guild *core.Guild
}
GenericGuildEvent is called upon receiving GuildUpdateEvent, GuildAvailableEvent, GuildUnavailableEvent, GuildJoinEvent, GuildLeaveEvent, GuildReadyEvent, GuildBanEvent, GuildUnbanEvent
type GenericGuildInviteEvent ¶
type GenericGuildInviteEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
ChannelID snowflake.Snowflake
Code string
}
GenericGuildInviteEvent is called upon receiving GuildInviteCreateEvent or GuildInviteDeleteEvent (requires discord.GatewayIntentGuildInvites)
func (GenericGuildInviteEvent) Channel ¶
func (e GenericGuildInviteEvent) Channel() core.GuildChannel
Channel returns the Channel the GenericGuildInviteEvent happened in.
type GenericGuildMemberEvent ¶
type GenericGuildMemberEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Member *core.Member
}
GenericGuildMemberEvent generic core.Member event
type GenericGuildMessageEvent ¶
type GenericGuildMessageEvent struct {
*GenericEvent
MessageID snowflake.Snowflake
Message *core.Message
ChannelID snowflake.Snowflake
GuildID snowflake.Snowflake
}
GenericGuildMessageEvent is called upon receiving GuildMessageCreateEvent, GuildMessageUpdateEvent or GuildMessageDeleteEvent
func (GenericGuildMessageEvent) Channel ¶
func (e GenericGuildMessageEvent) Channel() core.GuildMessageChannel
Channel returns the core.DMChannel where the GenericGuildMessageEvent happened
func (GenericGuildMessageEvent) Guild ¶
func (e GenericGuildMessageEvent) Guild() *core.Guild
Guild returns the core.Guild the GenericGuildMessageEvent happened in. This will only check cached guilds!
type GenericGuildMessageReactionEvent ¶
type GenericGuildMessageReactionEvent struct {
*GenericEvent
UserID snowflake.Snowflake
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
GuildID snowflake.Snowflake
Emoji discord.ReactionEmoji
}
GenericGuildMessageReactionEvent is called upon receiving GuildMessageReactionAddEvent or GuildMessageReactionRemoveEvent
func (*GenericGuildMessageReactionEvent) Member ¶
func (e *GenericGuildMessageReactionEvent) Member() *core.Member
func (*GenericGuildMessageReactionEvent) User ¶
func (e *GenericGuildMessageReactionEvent) User() *core.User
type GenericGuildScheduledEventEvent ¶ added in v0.6.1
type GenericGuildScheduledEventEvent struct {
*GenericEvent
GuildScheduledEvent *core.GuildScheduledEvent
}
type GenericGuildScheduledEventUserEvent ¶ added in v0.6.1
type GenericGuildScheduledEventUserEvent struct {
*GenericEvent
GuildScheduledEventID snowflake.Snowflake
UserID snowflake.Snowflake
GuildID snowflake.Snowflake
}
func (*GenericGuildScheduledEventUserEvent) GuildScheduledEvent ¶ added in v0.6.1
func (e *GenericGuildScheduledEventUserEvent) GuildScheduledEvent() *core.GuildScheduledEvent
func (*GenericGuildScheduledEventUserEvent) Member ¶ added in v0.6.1
func (e *GenericGuildScheduledEventUserEvent) Member() *core.Member
func (*GenericGuildScheduledEventUserEvent) User ¶ added in v0.6.1
func (e *GenericGuildScheduledEventUserEvent) User() *core.User
type GenericGuildVoiceEvent ¶
type GenericGuildVoiceEvent struct {
*GenericEvent
VoiceState *core.VoiceState
}
GenericGuildVoiceEvent is called upon receiving GuildVoiceJoinEvent, GuildVoiceMoveEvent, GuildVoiceLeaveEvent
type GenericIntegrationEvent ¶
type GenericIntegrationEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Integration core.Integration
}
func (*GenericIntegrationEvent) Guild ¶
func (e *GenericIntegrationEvent) Guild() *core.Guild
Guild returns the Guild this Integration was created in. This will only check cached guilds!
type GenericMessageEvent ¶
type GenericMessageEvent struct {
*GenericEvent
MessageID snowflake.Snowflake
Message *core.Message
ChannelID snowflake.Snowflake
GuildID *snowflake.Snowflake
}
GenericMessageEvent generic core.Message event
func (*GenericMessageEvent) Channel ¶
func (e *GenericMessageEvent) Channel() core.MessageChannel
Channel returns the core.Channel where the GenericMessageEvent happened
func (*GenericMessageEvent) Guild ¶
func (e *GenericMessageEvent) Guild() *core.Guild
Guild returns the core.Guild where the GenericMessageEvent happened or nil if it happened in DMs
type GenericReactionEvent ¶
type GenericReactionEvent struct {
*GenericEvent
UserID snowflake.Snowflake
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
GuildID *snowflake.Snowflake
Emoji discord.ReactionEmoji
}
GenericReactionEvent is called upon receiving MessageReactionAddEvent or MessageReactionRemoveEvent
func (*GenericReactionEvent) User ¶
func (e *GenericReactionEvent) User() *core.User
type GenericRoleEvent ¶
type GenericRoleEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
RoleID snowflake.Snowflake
Role *core.Role
}
GenericRoleEvent generic core.Role event
type GenericStageInstanceEvent ¶
type GenericStageInstanceEvent struct {
*GenericEvent
StageInstanceID snowflake.Snowflake
StageInstance *core.StageInstance
}
GenericStageInstanceEvent generic StageInstance event
type GenericStickerEvent ¶
type GenericStickerEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Sticker *core.Sticker
}
GenericStickerEvent is called upon receiving StickerCreateEvent, StickerUpdateEvent or StickerDeleteEvent (requires discord.GatewayIntentGuildEmojisAndStickers)
type GenericThreadEvent ¶
type GenericThreadEvent struct {
*GenericEvent
Thread core.GuildThread
ThreadID snowflake.Snowflake
GuildID snowflake.Snowflake
ParentID snowflake.Snowflake
}
type GenericThreadMemberEvent ¶
type GenericThreadMemberEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
ThreadID snowflake.Snowflake
ThreadMemberID snowflake.Snowflake
ThreadMember *core.ThreadMember
}
type GenericUserActivityEvent ¶
type GenericUserActivityEvent struct {
*GenericEvent
UserID snowflake.Snowflake
GuildID snowflake.Snowflake
Activity discord.Activity
}
GenericUserActivityEvent generic Activity event
func (*GenericUserActivityEvent) Guild ¶
func (g *GenericUserActivityEvent) Guild() *core.Guild
Guild returns the Guild that changed their Activity. This will only check cached guilds!
func (*GenericUserActivityEvent) Member ¶
func (g *GenericUserActivityEvent) Member() *core.Member
Member returns the Member that changed their Activity. This will only check cached members!
func (*GenericUserActivityEvent) User ¶
func (g *GenericUserActivityEvent) User() *core.User
User returns the User that changed their Activity. This will only check cached users!
type GenericUserEvent ¶
type GenericUserEvent struct {
*GenericEvent
UserID snowflake.Snowflake
User *core.User
}
GenericUserEvent is called upon receiving UserUpdateEvent or UserTypingStartEvent
type GuildAvailableEvent ¶
type GuildAvailableEvent struct {
*GenericGuildEvent
}
GuildAvailableEvent is called when an unavailable core.Guild becomes available
type GuildBanEvent ¶
type GuildBanEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
User *core.User
}
GuildBanEvent is called when a core.Member/core.User is banned from the core.Guild
type GuildChannelCreateEvent ¶
type GuildChannelCreateEvent struct {
*GenericGuildChannelEvent
}
GuildChannelCreateEvent indicates that a new Channel got created in a core.Guild
type GuildChannelDeleteEvent ¶
type GuildChannelDeleteEvent struct {
*GenericGuildChannelEvent
}
GuildChannelDeleteEvent indicates that a Channel got deleted in a core.Guild
type GuildChannelUpdateEvent ¶
type GuildChannelUpdateEvent struct {
*GenericGuildChannelEvent
OldChannel core.GuildChannel
}
GuildChannelUpdateEvent indicates that a Channel got updated in a core.Guild
type GuildIntegrationsUpdateEvent ¶
type GuildIntegrationsUpdateEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
}
type GuildInviteCreateEvent ¶
type GuildInviteCreateEvent struct {
*GenericGuildInviteEvent
Invite *core.Invite
}
GuildInviteCreateEvent is called upon creation of a new core.Invite in a core.Guild (requires discord.GatewayIntentGuildInvites)
type GuildInviteDeleteEvent ¶
type GuildInviteDeleteEvent struct {
*GenericGuildInviteEvent
}
GuildInviteDeleteEvent is called upon deletion of a core.Invite in a core.Guild (requires discord.GatewayIntentGuildInvites)
type GuildJoinEvent ¶
type GuildJoinEvent struct {
*GenericGuildEvent
}
GuildJoinEvent is called when the bot joins a core.Guild
type GuildLeaveEvent ¶
type GuildLeaveEvent struct {
*GenericGuildEvent
}
GuildLeaveEvent is called when the bot leaves a core.Guild
type GuildMemberJoinEvent ¶
type GuildMemberJoinEvent struct {
*GenericGuildMemberEvent
}
GuildMemberJoinEvent indicates that a core.Member joined the core.Guild
type GuildMemberLeaveEvent ¶
type GuildMemberLeaveEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
User *core.User
Member *core.Member
}
GuildMemberLeaveEvent indicates that a core.Member left the core.Guild
type GuildMemberTypingStartEvent ¶
type GuildMemberTypingStartEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
UserID snowflake.Snowflake
GuildID snowflake.Snowflake
Timestamp time.Time
Member *core.Member
}
GuildMemberTypingStartEvent indicates that a core.Member started typing in a core.BaseGuildMessageChannel(requires discord.GatewayIntentGuildMessageTyping)
func (GuildMemberTypingStartEvent) Channel ¶
func (e GuildMemberTypingStartEvent) Channel() core.BaseGuildMessageChannel
Channel returns the core.BaseGuildMessageChannel the GuildMemberTypingStartEvent happened in
type GuildMemberUpdateEvent ¶
type GuildMemberUpdateEvent struct {
*GenericGuildMemberEvent
OldMember *core.Member
}
GuildMemberUpdateEvent indicates that a core.Member updated
type GuildMessageCreateEvent ¶
type GuildMessageCreateEvent struct {
*GenericGuildMessageEvent
}
GuildMessageCreateEvent is called upon receiving a core.Message in a Channel
type GuildMessageDeleteEvent ¶
type GuildMessageDeleteEvent struct {
*GenericGuildMessageEvent
}
GuildMessageDeleteEvent is called upon deleting a core.Message in a Channel
type GuildMessageReactionAddEvent ¶
type GuildMessageReactionAddEvent struct {
*GenericGuildMessageReactionEvent
Member *core.Member
}
GuildMessageReactionAddEvent indicates that a core.Member added a discord.ReactionEmoji to a core.Message in a core.GuildMessageChannel(requires the discord.GatewayIntentGuildMessageReactions)
type GuildMessageReactionRemoveAllEvent ¶
type GuildMessageReactionRemoveAllEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
GuildID snowflake.Snowflake
}
GuildMessageReactionRemoveAllEvent indicates someone removed all discord.MessageReaction(s) from a core.Message in a Channel (requires the discord.GatewayIntentGuildMessageReactions)
type GuildMessageReactionRemoveEmojiEvent ¶
type GuildMessageReactionRemoveEmojiEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
GuildID snowflake.Snowflake
Emoji discord.ReactionEmoji
}
GuildMessageReactionRemoveEmojiEvent indicates someone removed all discord.MessageReaction of a specific core.Emoji from a core.Message in a Channel (requires the discord.GatewayIntentGuildMessageReactions)
type GuildMessageReactionRemoveEvent ¶
type GuildMessageReactionRemoveEvent struct {
*GenericGuildMessageReactionEvent
}
GuildMessageReactionRemoveEvent indicates that a core.Member removed a discord.MessageReaction from a core.Message in a Channel (requires the discord.GatewayIntentGuildMessageReactions)
type GuildMessageUpdateEvent ¶
type GuildMessageUpdateEvent struct {
*GenericGuildMessageEvent
OldMessage *core.Message
}
GuildMessageUpdateEvent is called upon editing a core.Message in a Channel
type GuildReadyEvent ¶
type GuildReadyEvent struct {
*GenericGuildEvent
}
GuildReadyEvent is called when a core.Guild becomes loaded for the first time
type GuildScheduledEventCreateEvent ¶ added in v0.6.1
type GuildScheduledEventCreateEvent struct {
*GenericGuildScheduledEventEvent
}
type GuildScheduledEventDeleteEvent ¶ added in v0.6.1
type GuildScheduledEventDeleteEvent struct {
*GenericGuildScheduledEventEvent
}
type GuildScheduledEventUpdateEvent ¶ added in v0.6.1
type GuildScheduledEventUpdateEvent struct {
*GenericGuildScheduledEventEvent
OldGuildScheduledEvent *core.GuildScheduledEvent
}
type GuildScheduledEventUserAddEvent ¶ added in v0.6.1
type GuildScheduledEventUserAddEvent struct {
*GenericGuildScheduledEventUserEvent
}
type GuildScheduledEventUserRemoveEvent ¶ added in v0.6.1
type GuildScheduledEventUserRemoveEvent struct {
*GenericGuildScheduledEventUserEvent
}
type GuildUnavailableEvent ¶
type GuildUnavailableEvent struct {
}
GuildUnavailableEvent is called when an available core.Guild becomes unavailable
type GuildUnbanEvent ¶
type GuildUnbanEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
User *core.User
}
GuildUnbanEvent is called when a core.Member/core.User is unbanned from the core.Guild
type GuildUpdateEvent ¶
type GuildUpdateEvent struct {
*GenericGuildEvent
OldGuild *core.Guild
}
GuildUpdateEvent is called upon receiving core.Guild updates
type GuildVoiceJoinEvent ¶
type GuildVoiceJoinEvent struct {
*GenericGuildVoiceEvent
}
GuildVoiceJoinEvent indicates that a core.Member joined a core.Channel(requires core.GatewayIntentsGuildVoiceStates)
type GuildVoiceLeaveEvent ¶
type GuildVoiceLeaveEvent struct {
*GenericGuildVoiceEvent
OldVoiceState *core.VoiceState
}
GuildVoiceLeaveEvent indicates that a core.Member left a core.Channel(requires core.GatewayIntentsGuildVoiceStates)
type GuildVoiceMoveEvent ¶
type GuildVoiceMoveEvent struct {
*GenericGuildVoiceEvent
OldVoiceState *core.VoiceState
}
GuildVoiceMoveEvent indicates that a core.Member moved a core.Channel(requires core.GatewayIntentsGuildVoiceStates)
type GuildVoiceStateUpdateEvent ¶
type GuildVoiceStateUpdateEvent struct {
*GenericGuildVoiceEvent
OldVoiceState *core.VoiceState
}
GuildVoiceStateUpdateEvent indicates that the core.VoiceState of a core.Member has updated(requires core.GatewayIntentsGuildVoiceStates)
type GuildsReadyEvent ¶
type GuildsReadyEvent struct {
*GenericEvent
ShardID int
}
GuildsReadyEvent is called when all core.Guild(s) are loaded after logging in
type HTTPRequestEvent ¶
type HTTPRequestEvent struct {
*GenericEvent
Request *http.Request
Response *http.Response
}
HTTPRequestEvent indicates a new http.Request was made and can be used to collect data of StatusCodes
type HeartbeatEvent ¶
type HeartbeatEvent struct {
*GenericEvent
NewPing time.Duration
OldPing time.Duration
}
HeartbeatEvent is called upon sending a heartbeat to the gateway.Gateway
type IntegrationCreateEvent ¶
type IntegrationCreateEvent struct {
*GenericIntegrationEvent
}
IntegrationCreateEvent indicates that a new Integration was created in a Guild
type IntegrationDeleteEvent ¶
type IntegrationDeleteEvent struct {
*GenericEvent
ID snowflake.Snowflake
GuildID snowflake.Snowflake
ApplicationID *snowflake.Snowflake
}
IntegrationDeleteEvent indicates that an Integration was deleted from a Guild
type IntegrationUpdateEvent ¶
type IntegrationUpdateEvent struct {
*GenericIntegrationEvent
}
IntegrationUpdateEvent indicates that an integration was updated in a Guild
type InteractionEvent ¶ added in v0.6.9
type InteractionEvent struct {
*GenericEvent
core.Interaction
}
type InvalidSessionEvent ¶
type InvalidSessionEvent struct {
*GenericEvent
MayResume bool
}
type ListenerAdapter ¶
type ListenerAdapter struct {
// Other events
OnHeartbeat func(event *HeartbeatEvent)
OnHTTPRequest func(event *HTTPRequestEvent)
OnRaw func(event *RawEvent)
// Thread Events
OnThreadCreate func(event *ThreadCreateEvent)
OnThreadUpdate func(event *ThreadUpdateEvent)
OnThreadDelete func(event *ThreadDeleteEvent)
OnThreadShow func(event *ThreadShowEvent)
OnThreadHide func(event *ThreadHideEvent)
// ThreadMember Events
OnThreadMemberAdd func(event *ThreadMemberAddEvent)
OnThreadMemberUpdate func(event *ThreadMemberUpdateEvent)
OnThreadMemberRemove func(event *ThreadMemberRemoveEvent)
// Channel Events
OnGuildChannelCreate func(event *GuildChannelCreateEvent)
OnGuildChannelUpdate func(event *GuildChannelUpdateEvent)
OnGuildChannelDelete func(event *GuildChannelDeleteEvent)
// DM Channel Events
OnDMChannelCreate func(event *DMChannelCreateEvent)
OnDMChannelUpdate func(event *DMChannelUpdateEvent)
OnDMChannelDelete func(event *DMChannelDeleteEvent)
// Channel Message Events
OnDMMessageCreate func(event *DMMessageCreateEvent)
OnDMMessageUpdate func(event *DMMessageUpdateEvent)
OnDMMessageDelete func(event *DMMessageDeleteEvent)
// Channel Reaction Events
OnDMMessageReactionAdd func(event *DMMessageReactionAddEvent)
OnDMMessageReactionRemove func(event *DMMessageReactionRemoveEvent)
OnDMMessageReactionRemoveEmoji func(event *DMMessageReactionRemoveEmojiEvent)
OnDMMessageReactionRemoveAll func(event *DMMessageReactionRemoveAllEvent)
// Emoji Events
OnEmojiCreate func(event *EmojiCreateEvent)
OnEmojiUpdate func(event *EmojiUpdateEvent)
OnEmojiDelete func(event *EmojiDeleteEvent)
// Sticker Events
OnStickerCreate func(event *StickerCreateEvent)
OnStickerUpdate func(event *StickerUpdateEvent)
OnStickerDelete func(event *StickerDeleteEvent)
// gateway status Events
OnReady func(event *ReadyEvent)
OnResumed func(event *ResumedEvent)
OnInvalidSession func(event *InvalidSessionEvent)
OnDisconnected func(event *DisconnectedEvent)
// Guild Events
OnGuildJoin func(event *GuildJoinEvent)
OnGuildUpdate func(event *GuildUpdateEvent)
OnGuildLeave func(event *GuildLeaveEvent)
OnGuildAvailable func(event *GuildAvailableEvent)
OnGuildReady func(event *GuildReadyEvent)
OnGuildsReady func(event *GuildsReadyEvent)
OnGuildBan func(event *GuildBanEvent)
OnGuildUnban func(event *GuildUnbanEvent)
// Guild Invite Events
OnGuildInviteCreate func(event *GuildInviteCreateEvent)
OnGuildInviteDelete func(event *GuildInviteDeleteEvent)
// Guild Member Events
OnGuildMemberJoin func(event *GuildMemberJoinEvent)
OnGuildMemberUpdate func(event *GuildMemberUpdateEvent)
OnGuildMemberLeave func(event *GuildMemberLeaveEvent)
// Guild Message Events
OnGuildMessageCreate func(event *GuildMessageCreateEvent)
OnGuildMessageUpdate func(event *GuildMessageUpdateEvent)
OnGuildMessageDelete func(event *GuildMessageDeleteEvent)
// Guild Message Reaction Events
OnGuildMessageReactionAdd func(event *GuildMessageReactionAddEvent)
OnGuildMessageReactionRemove func(event *GuildMessageReactionRemoveEvent)
OnGuildMessageReactionRemoveEmoji func(event *GuildMessageReactionRemoveEmojiEvent)
OnGuildMessageReactionRemoveAll func(event *GuildMessageReactionRemoveAllEvent)
// Guild Voice Events
OnVoiceServerUpdate func(event *VoiceServerUpdateEvent)
OnGuildVoiceStateUpdate func(event *GuildVoiceStateUpdateEvent)
OnGuildVoiceJoin func(event *GuildVoiceJoinEvent)
OnGuildVoiceMove func(event *GuildVoiceMoveEvent)
OnGuildVoiceLeave func(event *GuildVoiceLeaveEvent)
// Guild StageInstance Events
OnStageInstanceCreate func(event *StageInstanceCreateEvent)
OnStageInstanceUpdate func(event *StageInstanceUpdateEvent)
OnStageInstanceDelete func(event *StageInstanceDeleteEvent)
// Guild Role Events
OnRoleCreate func(event *RoleCreateEvent)
OnRoleUpdate func(event *RoleUpdateEvent)
OnRoleDelete func(event *RoleDeleteEvent)
// Guild Scheduled Events
OnGuildScheduledEventCreate func(event *GuildScheduledEventCreateEvent)
OnGuildScheduledEventUpdate func(event *GuildScheduledEventUpdateEvent)
OnGuildScheduledEventDelete func(event *GuildScheduledEventDeleteEvent)
OnGuildScheduledEventUserAdd func(event *GuildScheduledEventUserAddEvent)
OnGuildScheduledEventUserRemove func(event *GuildScheduledEventUserRemoveEvent)
// Interaction Events
OnInteraction func(event *InteractionEvent)
OnApplicationCommandInteraction func(event *ApplicationCommandInteractionEvent)
OnComponentInteraction func(event *ComponentInteractionEvent)
OnAutocompleteInteraction func(event *AutocompleteInteractionEvent)
// Message Events
OnMessageCreate func(event *MessageCreateEvent)
OnMessageUpdate func(event *MessageUpdateEvent)
OnMessageDelete func(event *MessageDeleteEvent)
// Message Reaction Events
OnMessageReactionAdd func(event *MessageReactionAddEvent)
OnMessageReactionRemove func(event *MessageReactionRemoveEvent)
OnMessageReactionRemoveEmoji func(event *MessageReactionRemoveEmojiEvent)
OnMessageReactionRemoveAll func(event *MessageReactionRemoveAllEvent)
// Self Events
OnSelfUpdate func(event *SelfUpdateEvent)
// User Events
OnUserUpdate func(event *UserUpdateEvent)
OnUserTypingStart func(event *UserTypingStartEvent)
OnGuildMemberTypingStart func(event *GuildMemberTypingStartEvent)
OnDMUserTypingStart func(event *DMUserTypingStartEvent)
// User Activity Events
OnUserActivityStart func(event *UserActivityStartEvent)
OnUserActivityUpdate func(event *UserActivityUpdateEvent)
OnUserActivityStop func(event *UserActivityStopEvent)
OnUserStatusUpdate func(event *UserStatusUpdateEvent)
OnUserClientStatusUpdate func(event *UserClientStatusUpdateEvent)
OnIntegrationCreate func(event *IntegrationCreateEvent)
OnIntegrationUpdate func(event *IntegrationUpdateEvent)
OnIntegrationDelete func(event *IntegrationDeleteEvent)
OnGuildIntegrationsUpdate func(event *GuildIntegrationsUpdateEvent)
OnGuildWebhooksUpdate func(event *WebhooksUpdateEvent)
}
ListenerAdapter lets you override the handles for receiving events
func (ListenerAdapter) OnEvent ¶
func (l ListenerAdapter) OnEvent(event core.Event)
OnEvent is getting called everytime we receive an event
type MessageCreateEvent ¶
type MessageCreateEvent struct {
*GenericMessageEvent
}
MessageCreateEvent indicates that a core.Message got received
type MessageDeleteEvent ¶
type MessageDeleteEvent struct {
*GenericMessageEvent
}
MessageDeleteEvent indicates that a core.Message got deleted
type MessageReactionAddEvent ¶
type MessageReactionAddEvent struct {
*GenericReactionEvent
Member *core.Member
}
MessageReactionAddEvent indicates that a core.User added a discord.MessageReaction to a core.Message in a core.Channel(this+++ requires the discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)
type MessageReactionRemoveAllEvent ¶
type MessageReactionRemoveAllEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
GuildID *snowflake.Snowflake
}
MessageReactionRemoveAllEvent indicates someone removed all discord.MessageReaction(s) from a core.Message in a core.Channel(requires the discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)
type MessageReactionRemoveEmojiEvent ¶
type MessageReactionRemoveEmojiEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
MessageID snowflake.Snowflake
GuildID *snowflake.Snowflake
Emoji discord.ReactionEmoji
}
MessageReactionRemoveEmojiEvent indicates someone removed all discord.MessageReaction of a specific core.Emoji from a core.Message in a core.Channel(requires the discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)
type MessageReactionRemoveEvent ¶
type MessageReactionRemoveEvent struct {
*GenericReactionEvent
}
MessageReactionRemoveEvent indicates that a core.User removed a discord.MessageReaction from a core.Message in a core.GetChannel(requires the discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)
type MessageUpdateEvent ¶
type MessageUpdateEvent struct {
*GenericMessageEvent
OldMessage *core.Message
}
MessageUpdateEvent indicates that a core.Message got update
type RawEvent ¶
type RawEvent struct {
*GenericEvent
Type discord.GatewayEventType
RawPayload json.RawMessage
}
RawEvent is called for any discord.GatewayEventType we receive if enabled in the bot.Config
type ReadyEvent ¶
type ReadyEvent struct {
*GenericEvent
discord.GatewayEventReady
}
ReadyEvent indicates we received the ReadyEvent from the gateway.Gateway
type ResumedEvent ¶
type ResumedEvent struct {
*GenericEvent
}
ResumedEvent indicates disgo resumed the gateway.Gateway
type RoleCreateEvent ¶
type RoleCreateEvent struct {
*GenericRoleEvent
}
RoleCreateEvent indicates that a core.Role got created
type RoleDeleteEvent ¶
type RoleDeleteEvent struct {
*GenericRoleEvent
}
RoleDeleteEvent indicates that a core.Role got deleted
type RoleUpdateEvent ¶
type RoleUpdateEvent struct {
*GenericRoleEvent
OldRole *core.Role
}
RoleUpdateEvent indicates that a core.Role got updated
type SelfUpdateEvent ¶
type SelfUpdateEvent struct {
*GenericEvent
SelfUser *core.SelfUser
OldSelfUser *core.SelfUser
}
SelfUpdateEvent is called when something about this core.User updates
type StageInstanceCreateEvent ¶
type StageInstanceCreateEvent struct {
*GenericStageInstanceEvent
}
StageInstanceCreateEvent indicates that a StageInstance got created
type StageInstanceDeleteEvent ¶
type StageInstanceDeleteEvent struct {
*GenericStageInstanceEvent
}
StageInstanceDeleteEvent indicates that a StageInstance got deleted
type StageInstanceUpdateEvent ¶
type StageInstanceUpdateEvent struct {
*GenericStageInstanceEvent
OldStageInstance *core.StageInstance
}
StageInstanceUpdateEvent indicates that a StageInstance got updated
type StickerCreateEvent ¶
type StickerCreateEvent struct {
*GenericStickerEvent
}
StickerCreateEvent indicates that a new core.Sticker got created in a core.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type StickerDeleteEvent ¶
type StickerDeleteEvent struct {
*GenericStickerEvent
}
StickerDeleteEvent indicates that a core.Sticker got deleted in a core.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type StickerUpdateEvent ¶
type StickerUpdateEvent struct {
*GenericStickerEvent
OldSticker *core.Sticker
}
StickerUpdateEvent indicates that a core.Sticker got updated in a core.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type ThreadCreateEvent ¶
type ThreadCreateEvent struct {
*GenericThreadEvent
}
type ThreadDeleteEvent ¶
type ThreadDeleteEvent struct {
*GenericThreadEvent
}
type ThreadHideEvent ¶
type ThreadHideEvent struct {
*GenericThreadEvent
}
type ThreadMemberAddEvent ¶
type ThreadMemberAddEvent struct {
*GenericThreadMemberEvent
}
type ThreadMemberRemoveEvent ¶
type ThreadMemberRemoveEvent struct {
*GenericThreadMemberEvent
}
type ThreadMemberUpdateEvent ¶
type ThreadMemberUpdateEvent struct {
*GenericThreadMemberEvent
OldThreadMember *core.ThreadMember
}
type ThreadShowEvent ¶
type ThreadShowEvent struct {
*GenericThreadEvent
}
type ThreadUpdateEvent ¶
type ThreadUpdateEvent struct {
*GenericThreadEvent
OldThread core.GuildThread
}
type UserActivityStartEvent ¶
type UserActivityStartEvent struct {
*GenericUserActivityEvent
}
UserActivityStartEvent indicates that a User started an Activity
type UserActivityStopEvent ¶
type UserActivityStopEvent struct {
*GenericUserActivityEvent
}
UserActivityStopEvent indicates that a User stopped an Activity
type UserActivityUpdateEvent ¶
type UserActivityUpdateEvent struct {
*GenericUserActivityEvent
OldActivity discord.Activity
}
UserActivityUpdateEvent indicates that a User updated their Activity
type UserClientStatusUpdateEvent ¶
type UserClientStatusUpdateEvent struct {
*GenericEvent
UserID snowflake.Snowflake
OldClientStatus *discord.ClientStatus
ClientStatus discord.ClientStatus
}
UserClientStatusUpdateEvent generic client-specific Status event
func (*UserClientStatusUpdateEvent) User ¶
func (g *UserClientStatusUpdateEvent) User() *core.User
User returns the User that changed their Status. This will only check cached users!
type UserStatusUpdateEvent ¶
type UserStatusUpdateEvent struct {
*GenericEvent
UserID snowflake.Snowflake
OldStatus discord.OnlineStatus
Status discord.OnlineStatus
}
UserStatusUpdateEvent generic Status event
func (*UserStatusUpdateEvent) User ¶
func (g *UserStatusUpdateEvent) User() *core.User
User returns the User that changed their Status. This will only check cached users!
type UserTypingStartEvent ¶
type UserTypingStartEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
GuildID *snowflake.Snowflake
UserID snowflake.Snowflake
Timestamp time.Time
}
UserTypingStartEvent indicates that a core.User started typing in a core.DMChannel or core.MessageChanel(requires the discord.GatewayIntentDirectMessageTyping and/or discord.GatewayIntentGuildMessageTyping)
func (*UserTypingStartEvent) Channel ¶
func (e *UserTypingStartEvent) Channel() core.MessageChannel
Channel returns the core.GetChannel the core.User started typing in
type UserUpdateEvent ¶
type UserUpdateEvent struct {
*GenericUserEvent
OldUser *core.User
}
UserUpdateEvent indicates that a core.User updated
type VoiceServerUpdateEvent ¶
type VoiceServerUpdateEvent struct {
*GenericEvent
VoiceServerUpdate discord.VoiceServerUpdate
}
type WebhooksUpdateEvent ¶
type WebhooksUpdateEvent struct {
*GenericEvent
GuildId snowflake.Snowflake
ChannelID snowflake.Snowflake
}
func (*WebhooksUpdateEvent) Channel ¶
func (e *WebhooksUpdateEvent) Channel() core.GuildMessageChannel
func (*WebhooksUpdateEvent) Guild ¶
func (e *WebhooksUpdateEvent) Guild() *core.Guild
Guild returns the Guild the webhook was updated in. This will only check cached guilds!
Source Files
¶
- events_dm_channel.go
- events_dm_message_event.go
- events_dm_message_reaction.go
- events_gateway_status.go
- events_generic_event.go
- events_guild.go
- events_guild_channel.go
- events_guild_emoji.go
- events_guild_invite.go
- events_guild_member.go
- events_guild_message.go
- events_guild_message_reaction.go
- events_guild_scheduled_events.go
- events_guild_sticker.go
- events_guild_voice.go
- events_guild_webhooks_update.go
- events_heartbeat_event.go
- events_http_request.go
- events_integration.go
- events_interactions.go
- events_message.go
- events_message_reaction.go
- events_raw_event.go
- events_role.go
- events_self_update.go
- events_stage_instance.go
- events_user.go
- events_user_activity.go
- events_user_status.go
- listener_adapter.go
- thread_events.go