Documentation
¶
Index ¶
- func HandleRawEvent(client bot.Client, gatewayEventType discord.GatewayEventType, ...) io.Reader
- type ApplicationCommandInteractionEvent
- func (e *ApplicationCommandInteractionEvent) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionEvent) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionEvent) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
- type AutocompleteInteractionEvent
- type ComponentInteractionEvent
- func (e *ComponentInteractionEvent) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionEvent) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionEvent) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionEvent) DeferUpdateMessage(opts ...rest.RequestOpt) error
- func (e *ComponentInteractionEvent) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- 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 EmojisUpdateEvent
- type GenericDMChannelEvent
- type GenericDMMessageEvent
- type GenericDMMessageReactionEvent
- type GenericEmojiEvent
- type GenericEvent
- type GenericGuildChannelEvent
- type GenericGuildEvent
- type GenericGuildMemberEvent
- type GenericGuildMessageEvent
- type GenericGuildMessageReactionEvent
- type GenericGuildScheduledEventEvent
- type GenericGuildScheduledEventUserEvent
- type GenericGuildVoiceStateEvent
- type GenericIntegrationEvent
- type GenericInviteEvent
- 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 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 InteractionResponderFunc
- type InvalidSessionEvent
- type InviteCreateEvent
- type InviteDeleteEvent
- type ListenerAdapter
- type MessageCreateEvent
- type MessageDeleteEvent
- type MessageReactionAddEvent
- type MessageReactionRemoveAllEvent
- type MessageReactionRemoveEmojiEvent
- type MessageReactionRemoveEvent
- type MessageUpdateEvent
- type ModalSubmitInteractionEvent
- func (e *ModalSubmitInteractionEvent) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionEvent) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionEvent) DeferUpdateMessage(opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionEvent) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- 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 StickersUpdateEvent
- 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 ¶
func HandleRawEvent ¶
Types ¶
type ApplicationCommandInteractionEvent ¶
type ApplicationCommandInteractionEvent struct {
*GenericEvent
discord.ApplicationCommandInteraction
Respond InteractionResponderFunc
}
func (*ApplicationCommandInteractionEvent) CreateMessage ¶
func (e *ApplicationCommandInteractionEvent) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*ApplicationCommandInteractionEvent) CreateModal ¶
func (e *ApplicationCommandInteractionEvent) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
func (*ApplicationCommandInteractionEvent) DeferCreateMessage ¶
func (e *ApplicationCommandInteractionEvent) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
type AutocompleteInteractionEvent ¶
type AutocompleteInteractionEvent struct {
*GenericEvent
discord.AutocompleteInteraction
Respond InteractionResponderFunc
}
func (*AutocompleteInteractionEvent) Result ¶
func (e *AutocompleteInteractionEvent) Result(choices []discord.AutocompleteChoice, opts ...rest.RequestOpt) error
type ComponentInteractionEvent ¶
type ComponentInteractionEvent struct {
*GenericEvent
discord.ComponentInteraction
Respond InteractionResponderFunc
}
func (*ComponentInteractionEvent) CreateMessage ¶
func (e *ComponentInteractionEvent) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*ComponentInteractionEvent) CreateModal ¶
func (e *ComponentInteractionEvent) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
func (*ComponentInteractionEvent) DeferCreateMessage ¶
func (e *ComponentInteractionEvent) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
func (*ComponentInteractionEvent) DeferUpdateMessage ¶
func (e *ComponentInteractionEvent) DeferUpdateMessage(opts ...rest.RequestOpt) error
func (*ComponentInteractionEvent) UpdateMessage ¶
func (e *ComponentInteractionEvent) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
type DMChannelCreateEvent ¶
type DMChannelCreateEvent struct {
*GenericDMChannelEvent
}
DMChannelCreateEvent indicates that a new discord.DMChannel got created
type DMChannelDeleteEvent ¶
type DMChannelDeleteEvent struct {
*GenericDMChannelEvent
}
DMChannelDeleteEvent indicates that a discord.DMChannel got deleted
type DMChannelUpdateEvent ¶
type DMChannelUpdateEvent struct {
*GenericDMChannelEvent
OldChannel discord.DMChannel
}
DMChannelUpdateEvent indicates that a discord.DMChannel got updated
type DMMessageCreateEvent ¶
type DMMessageCreateEvent struct {
*GenericDMMessageEvent
}
DMMessageCreateEvent is called upon receiving a discord.Message in a Channel (requires discord.GatewayIntentsDirectMessage)
type DMMessageDeleteEvent ¶
type DMMessageDeleteEvent struct {
*GenericDMMessageEvent
}
DMMessageDeleteEvent is called upon deleting a discord.Message in a Channel (requires discord.GatewayIntentsDirectMessage)
type DMMessageReactionAddEvent ¶
type DMMessageReactionAddEvent struct {
*GenericDMMessageReactionEvent
}
DMMessageReactionAddEvent indicates that a discord.User added a discord.MessageReaction to a discord.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 discord.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 discord.Emoji from a discord.Message in a Channel (requires the discord.GatewayIntentDirectMessageReactions)
type DMMessageReactionRemoveEvent ¶
type DMMessageReactionRemoveEvent struct {
*GenericDMMessageReactionEvent
}
DMMessageReactionRemoveEvent indicates that a discord.User removed a discord.MessageReaction from a discord.Message in a Channel (requires the discord.GatewayIntentDirectMessageReactions)
type DMMessageUpdateEvent ¶
type DMMessageUpdateEvent struct {
*GenericDMMessageEvent
OldMessage discord.Message
}
DMMessageUpdateEvent is called upon editing a discord.Message in a Channel (requires discord.GatewayIntentsDirectMessage)
type DMUserTypingStartEvent ¶
type DMUserTypingStartEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
UserID snowflake.Snowflake
Timestamp time.Time
}
DMUserTypingStartEvent indicates that a discord.User started typing in a discord.DMChannel(requires discord.GatewayIntentDirectMessageTyping)
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 discord.Emoji got created in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type EmojiDeleteEvent ¶
type EmojiDeleteEvent struct {
*GenericEmojiEvent
}
EmojiDeleteEvent indicates that a discord.Emoji got deleted in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type EmojiUpdateEvent ¶
type EmojiUpdateEvent struct {
*GenericEmojiEvent
OldEmoji discord.Emoji
}
EmojiUpdateEvent indicates that a discord.Emoji got updated in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type EmojisUpdateEvent ¶
type EmojisUpdateEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Emojis []discord.Emoji
}
type GenericDMChannelEvent ¶
type GenericDMChannelEvent struct {
*GenericEvent
Channel discord.DMChannel
ChannelID snowflake.Snowflake
}
GenericDMChannelEvent is called upon receiving DMChannelCreateEvent, DMChannelUpdateEvent, DMChannelDeleteEvent or DMUserTypingStartEvent
type GenericDMMessageEvent ¶
type GenericDMMessageEvent struct {
*GenericEvent
MessageID snowflake.Snowflake
Message discord.Message
ChannelID snowflake.Snowflake
}
GenericDMMessageEvent is called upon receiving DMMessageCreateEvent, DMMessageUpdateEvent, DMMessageDeleteEvent, GenericDMMessageReactionEvent, DMMessageReactionAddEvent, DMMessageReactionRemoveEvent, DMMessageReactionRemoveEmojiEvent or DMMessageReactionRemoveAllEvent (requires discord.GatewayIntentsDirectMessage)
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)
type GenericEmojiEvent ¶
type GenericEmojiEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Emoji discord.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(client bot.Client, sequenceNumber int) *GenericEvent
NewGenericEvent constructs a new GenericEvent with the provided Client instance
func (GenericEvent) Client ¶
func (e GenericEvent) Client() bot.Client
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 discord.GuildChannel
GuildID snowflake.Snowflake
}
GenericGuildChannelEvent is called upon receiving GuildChannelCreateEvent, GuildChannelUpdateEvent or GuildChannelDeleteEvent
type GenericGuildEvent ¶
type GenericGuildEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Guild discord.Guild
}
GenericGuildEvent is called upon receiving GuildUpdateEvent, GuildAvailableEvent, GuildUnavailableEvent, GuildJoinEvent, GuildLeaveEvent, GuildReadyEvent, GuildBanEvent, GuildUnbanEvent
type GenericGuildMemberEvent ¶
type GenericGuildMemberEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Member discord.Member
}
GenericGuildMemberEvent generic discord.Member event
type GenericGuildMessageEvent ¶
type GenericGuildMessageEvent struct {
*GenericEvent
MessageID snowflake.Snowflake
Message discord.Message
ChannelID snowflake.Snowflake
GuildID snowflake.Snowflake
}
GenericGuildMessageEvent is called upon receiving GuildMessageCreateEvent, GuildMessageUpdateEvent or GuildMessageDeleteEvent
func (GenericGuildMessageEvent) Channel ¶
func (e GenericGuildMessageEvent) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.DMChannel where the GenericGuildMessageEvent happened
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
type GenericGuildScheduledEventEvent ¶
type GenericGuildScheduledEventEvent struct {
*GenericEvent
GuildScheduledEvent discord.GuildScheduledEvent
}
type GenericGuildScheduledEventUserEvent ¶
type GenericGuildScheduledEventUserEvent struct {
*GenericEvent
GuildScheduledEventID snowflake.Snowflake
UserID snowflake.Snowflake
GuildID snowflake.Snowflake
}
func (*GenericGuildScheduledEventUserEvent) GuildScheduledEvent ¶
func (e *GenericGuildScheduledEventUserEvent) GuildScheduledEvent() (discord.GuildScheduledEvent, bool)
type GenericGuildVoiceStateEvent ¶
type GenericGuildVoiceStateEvent struct {
*GenericEvent
VoiceState discord.VoiceState
}
GenericGuildVoiceStateEvent is called upon receiving GuildVoiceJoinEvent, GuildVoiceMoveEvent, GuildVoiceLeaveEvent
type GenericIntegrationEvent ¶
type GenericIntegrationEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Integration discord.Integration
}
type GenericInviteEvent ¶
type GenericInviteEvent struct {
*GenericEvent
GuildID *snowflake.Snowflake
ChannelID snowflake.Snowflake
Code string
}
GenericInviteEvent is called upon receiving InviteCreateEvent or InviteDeleteEvent (requires discord.GatewayIntentGuildInvites)
func (GenericInviteEvent) Channel ¶
func (e GenericInviteEvent) Channel() (discord.GuildChannel, bool)
Channel returns the Channel the GenericInviteEvent happened in.
type GenericMessageEvent ¶
type GenericMessageEvent struct {
*GenericEvent
MessageID snowflake.Snowflake
Message discord.Message
ChannelID snowflake.Snowflake
GuildID *snowflake.Snowflake
}
GenericMessageEvent generic discord.Message event
func (*GenericMessageEvent) Channel ¶
func (e *GenericMessageEvent) Channel() (discord.MessageChannel, bool)
Channel returns the discord.Channel where the GenericMessageEvent happened
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
type GenericRoleEvent ¶
type GenericRoleEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
RoleID snowflake.Snowflake
Role discord.Role
}
GenericRoleEvent generic discord.Role event
type GenericStageInstanceEvent ¶
type GenericStageInstanceEvent struct {
*GenericEvent
StageInstanceID snowflake.Snowflake
StageInstance discord.StageInstance
}
GenericStageInstanceEvent generic StageInstance event
type GenericStickerEvent ¶
type GenericStickerEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Sticker discord.Sticker
}
GenericStickerEvent is called upon receiving StickerCreateEvent, StickerUpdateEvent or StickerDeleteEvent (requires discord.GatewayIntentGuildEmojisAndStickers)
type GenericThreadEvent ¶
type GenericThreadEvent struct {
*GenericEvent
Thread discord.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 discord.ThreadMember
}
type GenericUserActivityEvent ¶
type GenericUserActivityEvent struct {
*GenericEvent
UserID snowflake.Snowflake
GuildID snowflake.Snowflake
Activity discord.Activity
}
GenericUserActivityEvent generic Activity event
type GenericUserEvent ¶
type GenericUserEvent struct {
*GenericEvent
UserID snowflake.Snowflake
User discord.User
}
GenericUserEvent is called upon receiving UserUpdateEvent or UserTypingStartEvent
type GuildAvailableEvent ¶
type GuildAvailableEvent struct {
*GenericGuildEvent
}
GuildAvailableEvent is called when an unavailable discord.Guild becomes available
type GuildBanEvent ¶
type GuildBanEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
User discord.User
}
GuildBanEvent is called when a discord.Member/discord.User is banned from the discord.Guild
type GuildChannelCreateEvent ¶
type GuildChannelCreateEvent struct {
*GenericGuildChannelEvent
}
GuildChannelCreateEvent indicates that a new Channel got created in a discord.Guild
type GuildChannelDeleteEvent ¶
type GuildChannelDeleteEvent struct {
*GenericGuildChannelEvent
}
GuildChannelDeleteEvent indicates that a Channel got deleted in a discord.Guild
type GuildChannelUpdateEvent ¶
type GuildChannelUpdateEvent struct {
*GenericGuildChannelEvent
OldChannel discord.GuildChannel
}
GuildChannelUpdateEvent indicates that a Channel got updated in a discord.Guild
type GuildIntegrationsUpdateEvent ¶
type GuildIntegrationsUpdateEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
}
type GuildJoinEvent ¶
type GuildJoinEvent struct {
*GenericGuildEvent
}
GuildJoinEvent is called when the bot joins a discord.Guild
type GuildLeaveEvent ¶
type GuildLeaveEvent struct {
*GenericGuildEvent
}
GuildLeaveEvent is called when the bot leaves a discord.Guild
type GuildMemberJoinEvent ¶
type GuildMemberJoinEvent struct {
*GenericGuildMemberEvent
}
GuildMemberJoinEvent indicates that a discord.Member joined the discord.Guild
type GuildMemberLeaveEvent ¶
type GuildMemberLeaveEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
User discord.User
Member discord.Member
}
GuildMemberLeaveEvent indicates that a discord.Member left the discord.Guild
type GuildMemberTypingStartEvent ¶
type GuildMemberTypingStartEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
UserID snowflake.Snowflake
GuildID snowflake.Snowflake
Timestamp time.Time
Member discord.Member
}
GuildMemberTypingStartEvent indicates that a discord.Member started typing in a discord.BaseGuildMessageChannel(requires discord.GatewayIntentGuildMessageTyping)
func (GuildMemberTypingStartEvent) Channel ¶
func (e GuildMemberTypingStartEvent) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.BaseGuildMessageChannel the GuildMemberTypingStartEvent happened in
type GuildMemberUpdateEvent ¶
type GuildMemberUpdateEvent struct {
*GenericGuildMemberEvent
OldMember discord.Member
}
GuildMemberUpdateEvent indicates that a discord.Member updated
type GuildMessageCreateEvent ¶
type GuildMessageCreateEvent struct {
*GenericGuildMessageEvent
}
GuildMessageCreateEvent is called upon receiving a discord.Message in a Channel
type GuildMessageDeleteEvent ¶
type GuildMessageDeleteEvent struct {
*GenericGuildMessageEvent
}
GuildMessageDeleteEvent is called upon deleting a discord.Message in a Channel
type GuildMessageReactionAddEvent ¶
type GuildMessageReactionAddEvent struct {
*GenericGuildMessageReactionEvent
Member discord.Member
}
GuildMessageReactionAddEvent indicates that a discord.Member added a discord.ReactionEmoji to a discord.Message in a discord.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 discord.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 discord.Emoji from a discord.Message in a Channel (requires the discord.GatewayIntentGuildMessageReactions)
type GuildMessageReactionRemoveEvent ¶
type GuildMessageReactionRemoveEvent struct {
*GenericGuildMessageReactionEvent
}
GuildMessageReactionRemoveEvent indicates that a discord.Member removed a discord.MessageReaction from a discord.Message in a Channel (requires the discord.GatewayIntentGuildMessageReactions)
type GuildMessageUpdateEvent ¶
type GuildMessageUpdateEvent struct {
*GenericGuildMessageEvent
OldMessage discord.Message
}
GuildMessageUpdateEvent is called upon editing a discord.Message in a Channel
type GuildReadyEvent ¶
type GuildReadyEvent struct {
*GenericGuildEvent
}
GuildReadyEvent is called when a discord.Guild becomes loaded for the first time
type GuildScheduledEventCreateEvent ¶
type GuildScheduledEventCreateEvent struct {
*GenericGuildScheduledEventEvent
}
type GuildScheduledEventDeleteEvent ¶
type GuildScheduledEventDeleteEvent struct {
*GenericGuildScheduledEventEvent
}
type GuildScheduledEventUpdateEvent ¶
type GuildScheduledEventUpdateEvent struct {
*GenericGuildScheduledEventEvent
OldGuildScheduledEvent discord.GuildScheduledEvent
}
type GuildScheduledEventUserAddEvent ¶
type GuildScheduledEventUserAddEvent struct {
*GenericGuildScheduledEventUserEvent
}
type GuildScheduledEventUserRemoveEvent ¶
type GuildScheduledEventUserRemoveEvent struct {
*GenericGuildScheduledEventUserEvent
}
type GuildUnavailableEvent ¶
type GuildUnavailableEvent struct {
}
GuildUnavailableEvent is called when an available discord.Guild becomes unavailable
type GuildUnbanEvent ¶
type GuildUnbanEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
User discord.User
}
GuildUnbanEvent is called when a discord.Member/discord.User is unbanned from the discord.Guild
type GuildUpdateEvent ¶
type GuildUpdateEvent struct {
*GenericGuildEvent
OldGuild discord.Guild
}
GuildUpdateEvent is called upon receiving discord.Guild updates
type GuildVoiceJoinEvent ¶
type GuildVoiceJoinEvent struct {
*GenericGuildVoiceStateEvent
}
GuildVoiceJoinEvent indicates that a discord.Member joined a discord.Channel(requires discord.GatewayIntentsGuildVoiceStates)
type GuildVoiceLeaveEvent ¶
type GuildVoiceLeaveEvent struct {
*GenericGuildVoiceStateEvent
OldVoiceState discord.VoiceState
}
GuildVoiceLeaveEvent indicates that a discord.Member left a discord.Channel(requires discord.GatewayIntentsGuildVoiceStates)
type GuildVoiceMoveEvent ¶
type GuildVoiceMoveEvent struct {
*GenericGuildVoiceStateEvent
OldVoiceState discord.VoiceState
}
GuildVoiceMoveEvent indicates that a discord.Member moved a discord.Channel(requires discord.GatewayIntentsGuildVoiceStates)
type GuildVoiceStateUpdateEvent ¶
type GuildVoiceStateUpdateEvent struct {
*GenericGuildVoiceStateEvent
OldVoiceState discord.VoiceState
}
GuildVoiceStateUpdateEvent indicates that the discord.VoiceState of a discord.Member has updated(requires discord.GatewayIntentsGuildVoiceStates)
type GuildsReadyEvent ¶
type GuildsReadyEvent struct {
*GenericEvent
ShardID int
}
GuildsReadyEvent is called when all discord.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 ¶
type InteractionEvent struct {
*GenericEvent
discord.Interaction
Respond InteractionResponderFunc
}
type InteractionResponderFunc ¶
type InteractionResponderFunc func(callbackType discord.InteractionCallbackType, data discord.InteractionCallbackData, opts ...rest.RequestOpt) error
type InvalidSessionEvent ¶
type InvalidSessionEvent struct {
*GenericEvent
MayResume bool
}
type InviteCreateEvent ¶
type InviteCreateEvent struct {
*GenericInviteEvent
Invite discord.Invite
}
InviteCreateEvent is called upon creation of a new discord.Invite (requires discord.GatewayIntentGuildInvites)
type InviteDeleteEvent ¶
type InviteDeleteEvent struct {
*GenericInviteEvent
}
InviteDeleteEvent is called upon deletion of a discord.Invite (requires discord.GatewayIntentGuildInvites)
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
OnEmojisUpdate func(event *EmojisUpdateEvent)
OnEmojiCreate func(event *EmojiCreateEvent)
OnEmojiUpdate func(event *EmojiUpdateEvent)
OnEmojiDelete func(event *EmojiDeleteEvent)
// Sticker Events
OnStickersUpdate func(event *StickersUpdateEvent)
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 *InviteCreateEvent)
OnGuildInviteDelete func(event *InviteDeleteEvent)
// 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)
OnModalSubmit func(event *ModalSubmitInteractionEvent)
// 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 bot.Event)
OnEvent is getting called everytime we receive an event
type MessageCreateEvent ¶
type MessageCreateEvent struct {
*GenericMessageEvent
}
MessageCreateEvent indicates that a discord.Message got received
type MessageDeleteEvent ¶
type MessageDeleteEvent struct {
*GenericMessageEvent
}
MessageDeleteEvent indicates that a discord.Message got deleted
type MessageReactionAddEvent ¶
type MessageReactionAddEvent struct {
*GenericReactionEvent
Member *discord.Member
}
MessageReactionAddEvent indicates that a discord.User added a discord.MessageReaction to a discord.Message in a discord.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 discord.Message in a discord.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 discord.Emoji from a discord.Message in a discord.Channel(requires the discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)
type MessageReactionRemoveEvent ¶
type MessageReactionRemoveEvent struct {
*GenericReactionEvent
}
MessageReactionRemoveEvent indicates that a discord.User removed a discord.MessageReaction from a discord.Message in a discord.GetChannel(requires the discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)
type MessageUpdateEvent ¶
type MessageUpdateEvent struct {
*GenericMessageEvent
OldMessage discord.Message
}
MessageUpdateEvent indicates that a discord.Message got update
type ModalSubmitInteractionEvent ¶
type ModalSubmitInteractionEvent struct {
*GenericEvent
discord.ModalSubmitInteraction
Respond InteractionResponderFunc
}
func (*ModalSubmitInteractionEvent) CreateMessage ¶
func (e *ModalSubmitInteractionEvent) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*ModalSubmitInteractionEvent) DeferCreateMessage ¶
func (e *ModalSubmitInteractionEvent) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
func (*ModalSubmitInteractionEvent) DeferUpdateMessage ¶
func (e *ModalSubmitInteractionEvent) DeferUpdateMessage(opts ...rest.RequestOpt) error
func (*ModalSubmitInteractionEvent) UpdateMessage ¶
func (e *ModalSubmitInteractionEvent) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
type RawEvent ¶
type RawEvent struct {
*GenericEvent
Type discord.GatewayEventType
RawPayload json.RawMessage
ResponseChannel chan<- discord.InteractionResponse
}
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 discord.Role got created
type RoleDeleteEvent ¶
type RoleDeleteEvent struct {
*GenericRoleEvent
}
RoleDeleteEvent indicates that a discord.Role got deleted
type RoleUpdateEvent ¶
type RoleUpdateEvent struct {
*GenericRoleEvent
OldRole discord.Role
}
RoleUpdateEvent indicates that a discord.Role got updated
type SelfUpdateEvent ¶
type SelfUpdateEvent struct {
*GenericEvent
SelfUser discord.OAuth2User
OldSelfUser discord.OAuth2User
}
SelfUpdateEvent is called when something about this discord.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 discord.StageInstance
}
StageInstanceUpdateEvent indicates that a StageInstance got updated
type StickerCreateEvent ¶
type StickerCreateEvent struct {
*GenericStickerEvent
}
StickerCreateEvent indicates that a new discord.Sticker got created in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type StickerDeleteEvent ¶
type StickerDeleteEvent struct {
*GenericStickerEvent
}
StickerDeleteEvent indicates that a discord.Sticker got deleted in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type StickerUpdateEvent ¶
type StickerUpdateEvent struct {
*GenericStickerEvent
OldSticker discord.Sticker
}
StickerUpdateEvent indicates that a discord.Sticker got updated in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)
type StickersUpdateEvent ¶
type StickersUpdateEvent struct {
*GenericEvent
GuildID snowflake.Snowflake
Stickers []discord.Sticker
}
type ThreadCreateEvent ¶
type ThreadCreateEvent struct {
*GenericThreadEvent
ThreadMember discord.ThreadMember
}
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 discord.ThreadMember
}
type ThreadShowEvent ¶
type ThreadShowEvent struct {
*GenericThreadEvent
}
type ThreadUpdateEvent ¶
type ThreadUpdateEvent struct {
*GenericThreadEvent
OldThread discord.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
type UserStatusUpdateEvent ¶
type UserStatusUpdateEvent struct {
*GenericEvent
UserID snowflake.Snowflake
OldStatus discord.OnlineStatus
Status discord.OnlineStatus
}
UserStatusUpdateEvent generic Status event
type UserTypingStartEvent ¶
type UserTypingStartEvent struct {
*GenericEvent
ChannelID snowflake.Snowflake
GuildID *snowflake.Snowflake
UserID snowflake.Snowflake
Timestamp time.Time
}
UserTypingStartEvent indicates that a discord.User started typing in a discord.DMChannel or discord.MessageChanel(requires the discord.GatewayIntentDirectMessageTyping and/or discord.GatewayIntentGuildMessageTyping)
func (*UserTypingStartEvent) Channel ¶
func (e *UserTypingStartEvent) Channel() (discord.MessageChannel, bool)
Channel returns the discord.MessageChannel the discord.User started typing in
type UserUpdateEvent ¶
type UserUpdateEvent struct {
*GenericUserEvent
OldUser discord.User
}
UserUpdateEvent indicates that a discord.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() (discord.GuildMessageChannel, bool)
Source Files
¶
- dm_channel_events.go
- dm_message_event_events.go
- dm_message_reaction_events.go
- gateway_status_events.go
- generic_event.go
- guild_channel_events.go
- guild_emoji_events.go
- guild_events.go
- guild_integration_events.go
- guild_invite_events.go
- guild_member_events.go
- guild_message_events.go
- guild_message_reaction_events.go
- guild_role_events.go
- guild_scheduled_events_events.go
- guild_stage_instance_events.go
- guild_sticker_events.go
- guild_thread_events.go
- guild_voice_events.go
- guild_webhooks_update_events.go
- heartbeat_event_events.go
- http_request_events.go
- interaction_events.go
- listener_adapter.go
- message_events.go
- message_reaction_events.go
- raw_event.go
- self_update_events.go
- user_activity_events.go
- user_events.go
- user_status_events.go