Documentation
¶
Index ¶
- type ApplicationCommandCreateEvent
- type ApplicationCommandDeleteEvent
- type ApplicationCommandUpdateEvent
- type CategoryCreateEvent
- type CategoryDeleteEvent
- type CategoryUpdateEvent
- type ConnectedEvent
- type DMChannelCreateEvent
- type DMChannelDeleteEvent
- type DMChannelUpdateEvent
- type DMMessageCreateEvent
- type DMMessageDeleteEvent
- type DMMessageReactionAddEvent
- type DMMessageReactionRemoveAllEvent
- type DMMessageReactionRemoveEmoteEvent
- type DMMessageReactionRemoveEvent
- type DMMessageUpdateEvent
- type DMUserTypingEvent
- type DisconnectedEvent
- type EmoteCreateEvent
- type EmoteDeleteEvent
- type EmoteUpdateEvent
- type GenericApplicationCommandEvent
- type GenericCategoryEvent
- type GenericChannelEvent
- type GenericDMChannelEvent
- type GenericDMMessageEvent
- type GenericDMMessageReactionEvent
- type GenericEmoteEvent
- type GenericEvent
- type GenericGatewayStatusEvent
- type GenericGuildEvent
- type GenericGuildInviteEvent
- func (e GenericGuildInviteEvent) Category() *api.Category
- func (e GenericGuildInviteEvent) Channel() *api.Channel
- func (e GenericGuildInviteEvent) GuildChannel() *api.GuildChannel
- func (e GenericGuildInviteEvent) MessageChannel() *api.TextChannel
- func (e GenericGuildInviteEvent) StoreChannel() *api.StoreChannel
- func (e GenericGuildInviteEvent) TextChannel() *api.TextChannel
- func (e GenericGuildInviteEvent) VoiceChannel() *api.VoiceChannel
- type GenericGuildMemberEvent
- type GenericGuildMessageEvent
- type GenericGuildMessageReactionEvent
- type GenericGuildVoiceEvent
- type GenericInteractionEvent
- func (e GenericInteractionEvent) DMChannel() *api.DMChannel
- func (e GenericInteractionEvent) Guild() *api.Guild
- func (e GenericInteractionEvent) GuildChannel() *api.GuildChannel
- func (e GenericInteractionEvent) MessageChannel() *api.MessageChannel
- func (e GenericInteractionEvent) TextChannel() *api.TextChannel
- type GenericMessageEvent
- type GenericReactionEvents
- type GenericRoleEvent
- type GenericStoreChannelEvent
- type GenericTextChannelEvent
- type GenericUserActivityEvent
- type GenericUserEvent
- type GenericVoiceChannelEvent
- type GuildAvailableEvent
- type GuildBanEvent
- type GuildInviteCreateEvent
- type GuildInviteDeleteEvent
- type GuildJoinEvent
- type GuildLeaveEvent
- type GuildMemberJoinEvent
- type GuildMemberLeaveEvent
- type GuildMemberTypingEvent
- type GuildMemberUpdateEvent
- type GuildMessageCreateEvent
- type GuildMessageDeleteEvent
- type GuildMessageReactionAddEvent
- type GuildMessageReactionRemoveAllEvent
- type GuildMessageReactionRemoveEmoteEvent
- type GuildMessageReactionRemoveEvent
- type GuildMessageUpdateEvent
- type GuildReadyEvent
- type GuildUnavailableEvent
- type GuildUnbanEvent
- type GuildUpdateEvent
- type GuildVoiceJoinEvent
- type GuildVoiceLeaveEvent
- type GuildVoiceUpdateEvent
- type HTTPRequestEvent
- type HeartbeatEvent
- type ListenerAdapter
- type MessageCreateEvent
- type MessageDeleteEvent
- type MessageReactionAddEvent
- type MessageReactionRemoveAllEvent
- type MessageReactionRemoveEmoteEvent
- type MessageReactionRemoveEvent
- type MessageUpdateEvent
- type RawGatewayEvent
- type ReadyEvent
- type ReconnectedEvent
- type ResumedEvent
- type RoleCreateEvent
- type RoleDeleteEvent
- type RoleUpdateEvent
- type SelfUpdateEvent
- type SlashCommandEvent
- func (e *SlashCommandEvent) Acknowledge() error
- func (e SlashCommandEvent) CommandPath() string
- func (e *SlashCommandEvent) DeleteFollowup(messageID api.Snowflake) error
- func (e *SlashCommandEvent) DeleteOriginal() error
- func (e *SlashCommandEvent) EditFollowup(messageID api.Snowflake, followupMessage *api.FollowupMessage) (*api.Message, error)
- func (e *SlashCommandEvent) EditOriginal(followupMessage *api.FollowupMessage) (*api.Message, error)
- func (e SlashCommandEvent) Option(name string) *api.Option
- func (e SlashCommandEvent) OptionN(name string) []*api.Option
- func (e SlashCommandEvent) OptionsT(optionType api.CommandOptionType) []*api.Option
- func (e *SlashCommandEvent) Reply(response *api.InteractionResponse) error
- func (e *SlashCommandEvent) SendFollowup(followupMessage *api.FollowupMessage) (*api.Message, error)
- type StoreChannelCreateEvent
- type StoreChannelDeleteEvent
- type StoreChannelUpdateEvent
- type TextChannelCreateEvent
- type TextChannelDeleteEvent
- type TextChannelUpdateEvent
- type UserActivityEndEvent
- type UserActivityStartEvent
- type UserActivityUpdateEvent
- type UserTypingEvent
- type UserUpdateEvent
- type VoiceChannelCreateEvent
- type VoiceChannelDeleteEvent
- type VoiceChannelUpdateEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationCommandCreateEvent ¶ added in v0.2.0
type ApplicationCommandCreateEvent struct {
GenericApplicationCommandEvent
}
ApplicationCommandCreateEvent indicates that a new api.Command got created(this can come from any bot!)
type ApplicationCommandDeleteEvent ¶ added in v0.2.0
type ApplicationCommandDeleteEvent struct {
GenericApplicationCommandEvent
}
ApplicationCommandDeleteEvent indicates that a api.Command got deleted(this can come from any bot!)
type ApplicationCommandUpdateEvent ¶ added in v0.2.0
type ApplicationCommandUpdateEvent struct {
GenericApplicationCommandEvent
OldCommand *api.Command
}
ApplicationCommandUpdateEvent indicates that a api.Command got updated(this can come from any bot!)
type CategoryCreateEvent ¶ added in v0.2.0
type CategoryCreateEvent struct {
GenericCategoryEvent
}
CategoryCreateEvent indicates that a new api.Category got created in a api.Guild
type CategoryDeleteEvent ¶ added in v0.2.0
type CategoryDeleteEvent struct {
GenericCategoryEvent
}
CategoryDeleteEvent indicates that a api.Category got deleted in a api.Guild
type CategoryUpdateEvent ¶ added in v0.2.0
type CategoryUpdateEvent struct {
GenericCategoryEvent
OldCategory *api.Category
}
CategoryUpdateEvent indicates that a api.Category got updated in a api.Guild
type ConnectedEvent ¶ added in v0.2.0
type ConnectedEvent struct {
GenericGatewayStatusEvent
}
ConnectedEvent indicates disgo connected to the api.Gateway
type DMChannelCreateEvent ¶ added in v0.2.0
type DMChannelCreateEvent struct {
GenericDMChannelEvent
}
DMChannelCreateEvent indicates that a new api.DMChannel got created
type DMChannelDeleteEvent ¶ added in v0.2.0
type DMChannelDeleteEvent struct {
GenericDMChannelEvent
}
DMChannelDeleteEvent indicates that a api.DMChannel got deleted
type DMChannelUpdateEvent ¶ added in v0.2.0
type DMChannelUpdateEvent struct {
GenericDMChannelEvent
OldDMChannel *api.DMChannel
}
DMChannelUpdateEvent indicates that a api.DMChannel got updated
type DMMessageCreateEvent ¶ added in v0.2.0
type DMMessageCreateEvent struct {
GenericDMMessageEvent
}
DMMessageCreateEvent is called upon receiving a api.Message in a api.DMChannel(requires api.IntentsDirectMessages)
type DMMessageDeleteEvent ¶
type DMMessageDeleteEvent struct {
GenericDMMessageEvent
}
DMMessageDeleteEvent is called upon deleting a api.Message in a api.DMChannel(requires api.IntentsDirectMessages)
type DMMessageReactionAddEvent ¶ added in v0.2.0
type DMMessageReactionAddEvent struct {
GenericDMMessageReactionEvent
}
DMMessageReactionAddEvent indicates that a api.User added a api.MessageReaction to a api.Message in a api.DMChannel(requires the api.IntentsDirectMessageReactions)
type DMMessageReactionRemoveAllEvent ¶ added in v0.2.0
type DMMessageReactionRemoveAllEvent struct {
GenericDMMessageEvent
}
DMMessageReactionRemoveAllEvent indicates someone removed all api.MessageReaction(s) from a api.Message in a api.DMChannel(requires the api.IntentsDirectMessageReactions)
type DMMessageReactionRemoveEmoteEvent ¶ added in v0.2.0
type DMMessageReactionRemoveEmoteEvent struct {
GenericDMMessageEvent
MessageReaction api.MessageReaction
}
DMMessageReactionRemoveEmoteEvent indicates someone removed all api.MessageReaction of a specific api.Emote from a api.Message in a api.DMChannel(requires the api.IntentsDirectMessageReactions)
type DMMessageReactionRemoveEvent ¶ added in v0.2.0
type DMMessageReactionRemoveEvent struct {
GenericDMMessageReactionEvent
}
DMMessageReactionRemoveEvent indicates that a api.User removed a api.MessageReaction from a api.Message in a api.DMChannel(requires the api.IntentsDirectMessageReactions)
type DMMessageUpdateEvent ¶
type DMMessageUpdateEvent struct {
GenericDMMessageEvent
OldMessage *api.Message
}
DMMessageUpdateEvent is called upon editing a api.Message in a api.DMChannel(requires api.IntentsDirectMessages)
type DMUserTypingEvent ¶ added in v0.2.0
type DMUserTypingEvent struct {
GenericDMChannelEvent
}
DMUserTypingEvent indicates that a api.User started typing in a api.DMChannel(requires api.IntentsDirectMessageTyping)
type DisconnectedEvent ¶ added in v0.2.0
type DisconnectedEvent struct {
GenericGatewayStatusEvent
}
DisconnectedEvent indicates disgo disconnected to the api.Gateway
type EmoteCreateEvent ¶ added in v0.2.0
type EmoteCreateEvent struct {
GenericEmoteEvent
}
EmoteCreateEvent indicates that a new api.Emote got created in a api.Guild(requires api.IntentsGuildEmojis)
type EmoteDeleteEvent ¶ added in v0.2.0
type EmoteDeleteEvent struct {
GenericEmoteEvent
}
EmoteDeleteEvent indicates that a api.Emote got deleted in a api.Guild(requires api.IntentsGuildEmojis)
type EmoteUpdateEvent ¶ added in v0.2.0
type EmoteUpdateEvent struct {
GenericEmoteEvent
OldEmote *api.Emote
}
EmoteUpdateEvent indicates that a api.Emote got updated in a api.Guild(requires api.IntentsGuildEmojis)
type GenericApplicationCommandEvent ¶ added in v0.2.0
type GenericApplicationCommandEvent struct {
GenericEvent
CommandID api.Snowflake
Command *api.Command
GuildID *api.Snowflake
}
GenericApplicationCommandEvent is called upon receiving either ApplicationCommandCreateEvent, ApplicationCommandUpdateEvent or ApplicationCommandDeleteEvent
func (GenericApplicationCommandEvent) Guild ¶ added in v0.2.0
func (e GenericApplicationCommandEvent) Guild() *api.Guild
Guild returns the api.Guild the api.Event got called or nil for global api.Command(s)
type GenericCategoryEvent ¶
type GenericCategoryEvent struct {
GenericChannelEvent
Category *api.Category
}
GenericCategoryEvent is called upon receiving CategoryCreateEvent, CategoryUpdateEvent or CategoryDeleteEvent
type GenericChannelEvent ¶
type GenericChannelEvent struct {
GenericEvent
ChannelID api.Snowflake
}
GenericChannelEvent is called upon receiving any api.Channel api.Event
func (GenericChannelEvent) Channel ¶
func (e GenericChannelEvent) Channel() *api.Channel
Channel returns the api.Channel from the api.Cache if cached
type GenericDMChannelEvent ¶
type GenericDMChannelEvent struct {
GenericChannelEvent
DMChannel *api.DMChannel
}
GenericDMChannelEvent is called upon receiving DMChannelCreateEvent, DMChannelUpdateEvent, DMChannelDeleteEvent or DMUserTypingEvent
type GenericDMMessageEvent ¶
type GenericDMMessageEvent struct {
GenericMessageEvent
}
GenericDMMessageEvent is called upon receiving DMMessageCreateEvent, DMMessageUpdateEvent, DMMessageDeleteEvent, GenericDMMessageReactionEvent, DMMessageReactionAddEvent, DMMessageReactionRemoveEvent, DMMessageReactionRemoveEmoteEvent or DMMessageReactionRemoveAllEvent(requires api.IntentsDirectMessages)
func (GenericDMMessageEvent) DMChannel ¶ added in v0.2.0
func (e GenericDMMessageEvent) DMChannel() *api.DMChannel
DMChannel returns the api.DMChannel where the GenericDMMessageEvent happened
type GenericDMMessageReactionEvent ¶ added in v0.2.0
type GenericDMMessageReactionEvent struct {
GenericGuildMessageEvent
UserID api.Snowflake
User *api.User
MessageReaction api.MessageReaction
}
GenericDMMessageReactionEvent is called upon receiving DMMessageReactionAddEvent or DMMessageReactionRemoveEvent(requires the api.IntentsDirectMessageReactions)
type GenericEmoteEvent ¶ added in v0.2.0
type GenericEmoteEvent struct {
GenericGuildEvent
Emote *api.Emote
}
GenericEmoteEvent is called upon receiving EmoteCreateEvent, EmoteUpdateEvent or EmoteDeleteEvent(requires api.IntentsGuildEmojis)
type GenericEvent ¶ added in v0.2.0
type GenericEvent struct {
// contains filtered or unexported fields
}
GenericEvent the base event structure
func NewEvent ¶ added in v0.2.0
func NewEvent(disgo api.Disgo, sequenceNumber int) GenericEvent
NewEvent constructs a new GenericEvent with the provided Disgo instance
func (GenericEvent) Disgo ¶ added in v0.2.0
func (d GenericEvent) Disgo() api.Disgo
Disgo returns the Disgo instance for this event
func (GenericEvent) SequenceNumber ¶ added in v0.2.0
func (d GenericEvent) SequenceNumber() int
SequenceNumber returns the sequence number of the gateway event
type GenericGatewayStatusEvent ¶ added in v0.2.0
type GenericGatewayStatusEvent struct {
GenericEvent
Status api.GatewayStatus
}
GenericGatewayStatusEvent is called upon receiving ConnectedEvent, ReconnectedEvent, ResumedEvent, DisconnectedEvent or ShutdownEvent
type GenericGuildEvent ¶
type GenericGuildEvent struct {
GenericEvent
Guild *api.Guild
}
GenericGuildEvent is called upon receiving GuildUpdateEvent, GuildAvailableEvent, GuildUnavailableEvent, GuildJoinEvent, GuildLeaveEvent, GuildReadyEvent, GuildBanEvent, GuildUnbanEvent
type GenericGuildInviteEvent ¶ added in v0.2.0
type GenericGuildInviteEvent struct {
GenericGuildEvent
Code string
ChannelID api.Snowflake
}
GenericGuildInviteEvent is called upon receiving GuildInviteCreateEvent or GuildInviteDeleteEvent(requires api.IntentsGuildInvites)
func (GenericGuildInviteEvent) Category ¶ added in v0.2.0
func (e GenericGuildInviteEvent) Category() *api.Category
Category returns the api.Category the GenericGuildInviteEvent happened in(returns nil if the api.Category is uncached or api.CacheFlagCategories is disabled)
func (GenericGuildInviteEvent) Channel ¶ added in v0.2.0
func (e GenericGuildInviteEvent) Channel() *api.Channel
Channel returns the api.Channel the GenericGuildInviteEvent happened in(returns nil if the api.Channel is uncached or api.Cache is disabled)
func (GenericGuildInviteEvent) GuildChannel ¶ added in v0.2.0
func (e GenericGuildInviteEvent) GuildChannel() *api.GuildChannel
GuildChannel returns the api.GuildChannel the GenericGuildInviteEvent happened in(returns nil if the api.GuildChannel is uncached or api.Cache is disabled)
func (GenericGuildInviteEvent) MessageChannel ¶ added in v0.2.0
func (e GenericGuildInviteEvent) MessageChannel() *api.TextChannel
MessageChannel returns the api.MessageChannel the GenericGuildInviteEvent happened in(returns nil if the api.MessageChannel is uncached or api.Cache is disabled)
func (GenericGuildInviteEvent) StoreChannel ¶ added in v0.2.0
func (e GenericGuildInviteEvent) StoreChannel() *api.StoreChannel
StoreChannel returns the api.StoreChannel the GenericGuildInviteEvent happened in(returns nil if the api.StoreChannel is uncached or api.CacheFlagStoreChannels is disabled)
func (GenericGuildInviteEvent) TextChannel ¶ added in v0.2.0
func (e GenericGuildInviteEvent) TextChannel() *api.TextChannel
TextChannel returns the api.TextChannel the GenericGuildInviteEvent happened in(returns nil if the api.TextChannel is uncached or api.CacheFlagTextChannels is disabled)
func (GenericGuildInviteEvent) VoiceChannel ¶ added in v0.2.0
func (e GenericGuildInviteEvent) VoiceChannel() *api.VoiceChannel
VoiceChannel returns the api.VoiceChannel the GenericGuildInviteEvent happened in(returns nil if the api.VoiceChannel is uncached or api.CacheFlagVoiceChannels is disabled)
type GenericGuildMemberEvent ¶
type GenericGuildMemberEvent struct {
GenericGuildEvent
Member *api.Member
}
GenericGuildMemberEvent generic api.Member event
func (GenericGuildMemberEvent) User ¶
func (e GenericGuildMemberEvent) User() *api.User
User gets the api.User form the api.Cache
type GenericGuildMessageEvent ¶
type GenericGuildMessageEvent struct {
GenericMessageEvent
GuildID api.Snowflake
}
GenericGuildMessageEvent is called upon receiving GuildMessageCreateEvent, GuildMessageUpdateEvent or GuildMessageDeleteEvent
func (GenericGuildMessageEvent) Guild ¶ added in v0.2.0
func (e GenericGuildMessageEvent) Guild() *api.Guild
Guild returns the api.Guild the GenericGuildMessageEvent happened in
func (GenericGuildMessageEvent) TextChannel ¶ added in v0.2.0
func (e GenericGuildMessageEvent) TextChannel() *api.TextChannel
TextChannel returns the api.TextChannel from the api.Cache
type GenericGuildMessageReactionEvent ¶ added in v0.2.0
type GenericGuildMessageReactionEvent struct {
GenericGuildMessageEvent
UserID api.Snowflake
Member *api.Member
MessageReaction api.MessageReaction
}
GenericGuildMessageReactionEvent is called upon receiving DMMessageReactionAddEvent or DMMessageReactionRemoveEvent
type GenericGuildVoiceEvent ¶ added in v0.2.0
type GenericGuildVoiceEvent struct {
GenericGuildMemberEvent
VoiceState *api.VoiceState
}
GenericGuildVoiceEvent is called upon receiving GuildVoiceJoinEvent, GuildVoiceUpdateEvent, GuildVoiceLeaveEvent
type GenericInteractionEvent ¶
type GenericInteractionEvent struct {
GenericEvent
*api.Interaction
}
GenericInteractionEvent generic api.Interaction event
func (GenericInteractionEvent) DMChannel ¶
func (e GenericInteractionEvent) DMChannel() *api.DMChannel
DMChannel returns the api.DMChannel from the api.Cache
func (GenericInteractionEvent) Guild ¶
func (e GenericInteractionEvent) Guild() *api.Guild
Guild returns the api.Guild from the api.Cache
func (GenericInteractionEvent) GuildChannel ¶
func (e GenericInteractionEvent) GuildChannel() *api.GuildChannel
GuildChannel returns the api.GuildChannel from the api.Cache
func (GenericInteractionEvent) MessageChannel ¶
func (e GenericInteractionEvent) MessageChannel() *api.MessageChannel
MessageChannel returns the api.MessageChannel from the api.Cache
func (GenericInteractionEvent) TextChannel ¶
func (e GenericInteractionEvent) TextChannel() *api.TextChannel
TextChannel returns the api.TextChannel from the api.Cache
type GenericMessageEvent ¶
type GenericMessageEvent struct {
GenericEvent
MessageID api.Snowflake
Message *api.Message
ChannelID api.Snowflake
}
GenericMessageEvent generic api.Message event
func (*GenericMessageEvent) MessageChannel ¶
func (e *GenericMessageEvent) MessageChannel() *api.MessageChannel
MessageChannel returns the api.MessageChannel where the GenericMessageEvent happened
type GenericReactionEvents ¶ added in v0.2.0
type GenericReactionEvents struct {
GenericMessageEvent
UserID api.Snowflake
User *api.User
MessageReaction api.MessageReaction
}
GenericReactionEvents is called upon receiving MessageReactionAddEvent or MessageReactionRemoveEvent
type GenericRoleEvent ¶ added in v0.2.0
type GenericRoleEvent struct {
GenericGuildEvent
RoleID api.Snowflake
Role *api.Role
}
GenericRoleEvent generic api.Role event
type GenericStoreChannelEvent ¶
type GenericStoreChannelEvent struct {
GenericChannelEvent
StoreChannel *api.StoreChannel
}
GenericStoreChannelEvent is called upon receiving StoreChannelCreateEvent, StoreChannelUpdateEvent or StoreChannelDeleteEvent
type GenericTextChannelEvent ¶
type GenericTextChannelEvent struct {
GenericChannelEvent
TextChannel *api.TextChannel
}
GenericTextChannelEvent is called upon receiving TextChannelCreateEvent, TextChannelUpdateEvent or TextChannelDeleteEvent
type GenericUserActivityEvent ¶ added in v0.2.0
type GenericUserActivityEvent struct {
GenericGuildMemberEvent
Member *api.Member
}
GenericUserActivityEvent is called upon receiving UserActivityStartEvent, UserActivityUpdateEvent or UserActivityEndEvent(requires the api.IntentsGuildPresences)
type GenericUserEvent ¶ added in v0.2.0
type GenericUserEvent struct {
GenericEvent
UserID api.Snowflake
User *api.User
}
GenericUserEvent is called upon receiving UserUpdateEvent or UserTypingEvent
type GenericVoiceChannelEvent ¶
type GenericVoiceChannelEvent struct {
GenericChannelEvent
VoiceChannel *api.VoiceChannel
}
GenericVoiceChannelEvent is called upon receiving VoiceChannelCreateEvent, VoiceChannelUpdateEvent or VoiceChannelDeleteEvent
type GuildAvailableEvent ¶
type GuildAvailableEvent struct {
GenericGuildEvent
}
GuildAvailableEvent is called when an unavailable api.Guild becomes available
type GuildBanEvent ¶ added in v0.2.0
type GuildBanEvent struct {
GenericGuildEvent
User *api.User
}
GuildBanEvent is called when a api.Member/api.User is banned from the api.Guild
type GuildInviteCreateEvent ¶ added in v0.2.0
type GuildInviteCreateEvent struct {
GenericGuildInviteEvent
Invite *api.Invite
}
GuildInviteCreateEvent is called upon creation of a new api.Invite in a api.Guild(requires api.IntentsGuildInvites)
type GuildInviteDeleteEvent ¶ added in v0.2.0
type GuildInviteDeleteEvent struct {
GenericGuildInviteEvent
}
GuildInviteDeleteEvent is called upon deletion of a new api.Invite in a api.Guild(requires api.IntentsGuildInvites)
type GuildJoinEvent ¶
type GuildJoinEvent struct {
GenericGuildEvent
}
GuildJoinEvent is called when the bot joins a api.Guild
type GuildLeaveEvent ¶
type GuildLeaveEvent struct {
GenericGuildEvent
}
GuildLeaveEvent is called when the bot leaves a api.Guild
type GuildMemberJoinEvent ¶
type GuildMemberJoinEvent struct {
GenericGuildMemberEvent
}
GuildMemberJoinEvent indicates that a api.Member joined the api.Guild
type GuildMemberLeaveEvent ¶
type GuildMemberLeaveEvent struct {
GenericGuildMemberEvent
User *api.User
}
GuildMemberLeaveEvent indicates that a api.Member left the api.Guild
type GuildMemberTypingEvent ¶ added in v0.2.0
type GuildMemberTypingEvent struct {
GenericGuildMemberEvent
ChannelID api.Snowflake
}
GuildMemberTypingEvent indicates that a api.Member started typing in a api.TextChannel(requires api.IntentsGuildMessageTyping)
func (GuildMemberTypingEvent) TextChannel ¶ added in v0.2.0
func (e GuildMemberTypingEvent) TextChannel() *api.TextChannel
TextChannel returns the api.TextChannel the GuildMemberTypingEvent happened in
type GuildMemberUpdateEvent ¶
type GuildMemberUpdateEvent struct {
GenericGuildMemberEvent
OldMember *api.Member
}
GuildMemberUpdateEvent indicates that a api.Member updated
type GuildMessageCreateEvent ¶ added in v0.2.0
type GuildMessageCreateEvent struct {
GenericGuildMessageEvent
}
GuildMessageCreateEvent is called upon receiving a api.Message in a api.DMChannel
type GuildMessageDeleteEvent ¶
type GuildMessageDeleteEvent struct {
GenericGuildMessageEvent
}
GuildMessageDeleteEvent is called upon deleting a api.Message in a api.DMChannel
type GuildMessageReactionAddEvent ¶ added in v0.2.0
type GuildMessageReactionAddEvent struct {
GenericGuildMessageReactionEvent
}
GuildMessageReactionAddEvent indicates that a api.Member added a api.MessageReaction to a api.Message in a api.TextChannel(requires the api.IntentsGuildMessageReactions)
type GuildMessageReactionRemoveAllEvent ¶ added in v0.2.0
type GuildMessageReactionRemoveAllEvent struct {
GenericGuildMessageEvent
}
GuildMessageReactionRemoveAllEvent indicates someone removed all api.MessageReaction(s) from a api.Message in a api.TextChannel(requires the api.IntentsGuildMessageReactions)
type GuildMessageReactionRemoveEmoteEvent ¶ added in v0.2.0
type GuildMessageReactionRemoveEmoteEvent struct {
GenericGuildMessageEvent
MessageReaction api.MessageReaction
}
GuildMessageReactionRemoveEmoteEvent indicates someone removed all api.MessageReaction of a specific api.Emote from a api.Message in a api.TextChannel(requires the api.IntentsGuildMessageReactions)
type GuildMessageReactionRemoveEvent ¶ added in v0.2.0
type GuildMessageReactionRemoveEvent struct {
GenericGuildMessageReactionEvent
}
GuildMessageReactionRemoveEvent indicates that a api.Member removed a api.MessageReaction from a api.Message in a api.TextChannel(requires the api.IntentsGuildMessageReactions)
type GuildMessageUpdateEvent ¶
type GuildMessageUpdateEvent struct {
GenericGuildMessageEvent
OldMessage *api.Message
}
GuildMessageUpdateEvent is called upon editing a api.Message in a api.DMChannel
type GuildReadyEvent ¶ added in v0.2.0
type GuildReadyEvent struct {
GenericGuildEvent
}
GuildReadyEvent is called when the loaded the api.Guild in login phase
type GuildUnavailableEvent ¶
type GuildUnavailableEvent struct {
}
GuildUnavailableEvent is called when an available api.Guild becomes unavailable
type GuildUnbanEvent ¶ added in v0.2.0
type GuildUnbanEvent struct {
GenericGuildEvent
User *api.User
}
GuildUnbanEvent is called when a api.Member/api.User is unbanned from the api.Guild
type GuildUpdateEvent ¶
type GuildUpdateEvent struct {
GenericGuildEvent
OldGuild *api.Guild
}
GuildUpdateEvent is called upon receiving api.Guild updates
type GuildVoiceJoinEvent ¶ added in v0.2.0
type GuildVoiceJoinEvent struct {
GenericGuildVoiceEvent
}
GuildVoiceJoinEvent indicates that a api.Member joined a api.VoiceChannel(requires api.IntentsGuildVoiceStates)
type GuildVoiceLeaveEvent ¶ added in v0.2.0
type GuildVoiceLeaveEvent struct {
GenericGuildVoiceEvent
}
GuildVoiceLeaveEvent indicates that a api.Member left a api.VoiceChannel(requires api.IntentsGuildVoiceStates)
type GuildVoiceUpdateEvent ¶ added in v0.2.0
type GuildVoiceUpdateEvent struct {
GenericGuildVoiceEvent
OldVoiceState *api.VoiceState
}
GuildVoiceUpdateEvent indicates that a api.Member moved a api.VoiceChannel(requires api.IntentsGuildVoiceStates)
type HTTPRequestEvent ¶ added in v0.2.0
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 as an example
type HeartbeatEvent ¶ added in v0.2.0
type HeartbeatEvent struct {
GenericEvent
NewPing time.Duration
OldPing time.Duration
}
HeartbeatEvent is called upon sending a heartbeat to the api.Gateway
type ListenerAdapter ¶
type ListenerAdapter struct {
// Other events
OnGenericEvent func(event *GenericEvent)
OnHeartbeat func(event *HeartbeatEvent)
OnHTTPRequest func(event *HTTPRequestEvent)
OnRawGateway func(event *RawGatewayEvent)
OnReadyEvent func(event *ReadyEvent)
// api.Command Events
OnGenericApplicationCommandEvent func(event *GenericApplicationCommandEvent)
OnApplicationCommandCreate func(event *ApplicationCommandCreateEvent)
OnApplicationCommandUpdate func(event *ApplicationCommandUpdateEvent)
OnApplicationCommandDelete func(event *ApplicationCommandDeleteEvent)
// api.Channel Events
OnGenericChannelEvent func(event *GenericChannelEvent)
// api.Category Events
OnGenericCategoryEvent func(event *GenericCategoryEvent)
OnCategoryCreate func(event *CategoryCreateEvent)
OnCategoryUpdate func(event *CategoryUpdateEvent)
OnCategoryDelete func(event *CategoryDeleteEvent)
// api.DMChannel Events
OnGenericDMChannelEvent func(event *GenericDMChannelEvent)
OnDMChannelCreate func(event *DMChannelCreateEvent)
OnDMChannelUpdate func(event *DMChannelUpdateEvent)
OnDMChannelDelete func(event *DMChannelDeleteEvent)
// api.DMChannel Reaction Events
OnGenericDMMessageReactionEventEvent func(event *GenericDMMessageReactionEvent)
OnDMMessageReactionAdd func(event *DMMessageReactionAddEvent)
OnDMMessageReactionRemove func(event *DMMessageReactionRemoveEvent)
OnDMMessageReactionRemoveEmote func(event *DMMessageReactionRemoveEmoteEvent)
OnDMMessageReactionRemoveAll func(event *DMMessageReactionRemoveAllEvent)
// api.StoreChannel Events
OnGenericStoreChannelEvent func(event *GenericStoreChannelEvent)
OnStoreChannelCreate func(event *StoreChannelCreateEvent)
OnStoreChannelUpdate func(event *StoreChannelUpdateEvent)
OnStoreChannelDelete func(event *StoreChannelDeleteEvent)
// api.TextChannel Events
OnGenericTextChannelEvent func(event *GenericTextChannelEvent)
OnTextChannelCreate func(event *TextChannelCreateEvent)
OnTextChannelUpdate func(event *TextChannelUpdateEvent)
OnTextChannelDelete func(event *TextChannelDeleteEvent)
// api.VoiceChannel Events
OnGenericVoiceChannelEvent func(event *GenericVoiceChannelEvent)
OnVoiceChannelCreate func(event *VoiceChannelCreateEvent)
OnVoiceChannelUpdate func(event *VoiceChannelUpdateEvent)
OnVoiceChannelDelete func(event *VoiceChannelDeleteEvent)
// api.Emote Events
OnGenericEmoteEvent func(event *GenericEmoteEvent)
OnEmoteCreate func(event *EmoteCreateEvent)
OnEmoteUpdate func(event *EmoteUpdateEvent)
OnEmoteDelete func(event *EmoteDeleteEvent)
// api.GatewayStatus Events
OnGenericGatewayStatusEvent func(event *GenericGatewayStatusEvent)
OnConnected func(event *ConnectedEvent)
OnReconnected func(event *ReconnectedEvent)
OnResumed func(event *ResumedEvent)
OnDisconnected func(event *DisconnectedEvent)
// api.Guild Events
OnGenericGuildEvent func(event *GenericGuildEvent)
OnGuildJoin func(event *GuildJoinEvent)
OnGuildUpdate func(event *GuildUpdateEvent)
OnGuildLeave func(event *GuildLeaveEvent)
OnGuildAvailable func(event *GuildAvailableEvent)
OnGuildReady func(event *GuildReadyEvent)
OnGuildBan func(event *GuildBanEvent)
OnGuildUnban func(event *GuildUnbanEvent)
// api.Guild api.Invite Events
OnGenericGuildInviteEvent func(event *GenericGuildInviteEvent)
OnGuildInviteCreate func(event *GuildInviteCreateEvent)
OnGuildInviteDelete func(event *GuildInviteDeleteEvent)
// api.Guild api.Member Events
OnGenericGuildMemberEvent func(event *GenericGuildMemberEvent)
OnGuildMemberJoin func(event *GuildMemberJoinEvent)
OnGuildMemberUpdate func(event *GuildMemberUpdateEvent)
OnGuildMemberLeave func(event *GuildMemberLeaveEvent)
// api.Guild api.Message Events
OnGenericGuildMessageEvent func(event *GenericGuildMessageEvent)
OnGuildMessageCreate func(event *GuildMessageCreateEvent)
OnGuildMessageUpdate func(event *GuildMessageUpdateEvent)
OnGuildMessageDelete func(event *GuildMessageDeleteEvent)
// api.Guild api.Message Reaction Events
OnGenericGuildMessageReactionEvent func(event *GenericGuildMessageReactionEvent)
OnGuildMessageReactionAdd func(event *GuildMessageReactionAddEvent)
OnGuildMessageReactionRemove func(event *GuildMessageReactionRemoveEvent)
OnGuildMessageReactionRemoveEmote func(event *GuildMessageReactionRemoveEmoteEvent)
OnGuildMessageReactionRemoveAll func(event *GuildMessageReactionRemoveAllEvent)
// api.Guild Voice Events
OnGenericGuildVoiceEvent func(event *GenericGuildVoiceEvent)
OnGuildVoiceUpdate func(event *GuildVoiceUpdateEvent)
OnGuildVoiceJoin func(event *GuildVoiceJoinEvent)
OnGuildVoiceLeave func(event *GuildVoiceLeaveEvent)
// api.Guild api.Role Events
OnGenericRoleEvent func(event *GenericRoleEvent)
OnRoleCreate func(event *RoleCreateEvent)
OnRoleUpdate func(event *RoleUpdateEvent)
OnRoleDelete func(event *RoleDeleteEvent)
// api.Interaction Events
OnGenericInteractionEvent func(event *GenericInteractionEvent)
OnSlashCommand func(event *SlashCommandEvent)
// api.Message Events
OnGenericMessageEvent func(event *GenericMessageEvent)
OnMessageCreate func(event *MessageCreateEvent)
OnMessageUpdate func(event *MessageUpdateEvent)
OnMessageDelete func(event *MessageDeleteEvent)
// api.Message Reaction Events
OnGenericReactionEvent func(event *GenericReactionEvents)
OnMessageReactionAdd func(event *MessageReactionAddEvent)
OnMessageReactionRemove func(event *MessageReactionRemoveEvent)
OnMessageReactionRemoveEmote func(event *MessageReactionRemoveEmoteEvent)
OnMessageReactionRemoveAll func(event *MessageReactionRemoveAllEvent)
// Self Events
OnSelfUpdate func(event *SelfUpdateEvent)
// api.User Events
OnGenericUserEvent func(event *GenericUserEvent)
OnUserUpdate func(event *UserUpdateEvent)
OnUserTyping func(event *UserTypingEvent)
OnGuildUserTyping func(event *GuildMemberTypingEvent)
OnDMUserTyping func(event *DMUserTypingEvent)
// api.User api.Activity Events
OnGenericUserActivityEvent func(event *GenericUserActivityEvent)
OnUserActivityStart func(event *UserActivityStartEvent)
OnUserActivityUpdate func(event *UserActivityUpdateEvent)
OnUserActivityEnd func(event *UserActivityEndEvent)
}
ListenerAdapter lets you override the handles for receiving events
func (ListenerAdapter) OnEvent ¶
func (l ListenerAdapter) OnEvent(event interface{})
OnEvent is getting called everytime we receive an event
type MessageCreateEvent ¶ added in v0.2.0
type MessageCreateEvent struct {
GenericMessageEvent
}
MessageCreateEvent indicates that a api.Message got received
type MessageDeleteEvent ¶
type MessageDeleteEvent struct {
GenericMessageEvent
}
MessageDeleteEvent indicates that a api.Message got deleted
type MessageReactionAddEvent ¶ added in v0.2.0
type MessageReactionAddEvent struct {
GenericReactionEvents
}
MessageReactionAddEvent indicates that a api.User added a api.MessageReaction to a api.Message in a api.Channel(this+++ requires the api.IntentsGuildMessageReactions and/or api.IntentsDirectMessageReactions)
type MessageReactionRemoveAllEvent ¶ added in v0.2.0
type MessageReactionRemoveAllEvent struct {
GenericMessageEvent
}
MessageReactionRemoveAllEvent indicates someone removed all api.MessageReaction(s) from a api.Message in a api.Channel(requires the api.IntentsGuildMessageReactions and/or api.IntentsDirectMessageReactionss)
type MessageReactionRemoveEmoteEvent ¶ added in v0.2.0
type MessageReactionRemoveEmoteEvent struct {
GenericMessageEvent
MessageReaction api.MessageReaction
}
MessageReactionRemoveEmoteEvent indicates someone removed all api.MessageReaction of a specific api.Emote from a api.Message in a api.Channel(requires the api.IntentsGuildMessageReactions and/or api.IntentsDirectMessageReactions)
type MessageReactionRemoveEvent ¶ added in v0.2.0
type MessageReactionRemoveEvent struct {
GenericReactionEvents
}
MessageReactionRemoveEvent indicates that a api.User removed a api.MessageReaction from a api.Message in a api.Channel(requires the api.IntentsGuildMessageReactions and/or api.IntentsDirectMessageReactions)
type MessageUpdateEvent ¶
type MessageUpdateEvent struct {
GenericMessageEvent
OldMessage *api.Message
}
MessageUpdateEvent indicates that a api.Message got update
type RawGatewayEvent ¶ added in v0.2.0
type RawGatewayEvent struct {
GenericEvent
Type api.GatewayEventType
RawPayload json.RawMessage
Payload map[string]interface{}
}
RawGatewayEvent is called for any api.GatewayEventType we receive if enabled in the api.DisgoBuilder/api.Options
type ReadyEvent ¶
type ReadyEvent struct {
GenericEvent
api.ReadyGatewayEvent
}
ReadyEvent indicates we received the ReadyEvent from the api.Gateway
type ReconnectedEvent ¶ added in v0.2.0
type ReconnectedEvent struct {
GenericGatewayStatusEvent
}
ReconnectedEvent indicates disgo reconnected to the api.Gateway
type ResumedEvent ¶ added in v0.2.0
type ResumedEvent struct {
GenericGatewayStatusEvent
}
ResumedEvent indicates disgo resumed to the api.Gateway
type RoleCreateEvent ¶ added in v0.2.0
type RoleCreateEvent struct {
GenericGuildEvent
}
RoleCreateEvent indicates that a api.Role got created
type RoleDeleteEvent ¶ added in v0.2.0
type RoleDeleteEvent struct {
GenericGuildEvent
}
RoleDeleteEvent indicates that a api.Role got deleted
type RoleUpdateEvent ¶ added in v0.2.0
type RoleUpdateEvent struct {
GenericGuildEvent
OldRole *api.Role
}
RoleUpdateEvent indicates that a api.Role got updated
type SelfUpdateEvent ¶ added in v0.2.0
type SelfUpdateEvent struct {
GenericEvent
Self *api.User
OldSelf *api.User
}
SelfUpdateEvent is called when something about this api.User updates
type SlashCommandEvent ¶
type SlashCommandEvent struct {
GenericInteractionEvent
ResponseChannel chan *api.InteractionResponse
FromWebhook bool
CommandID api.Snowflake
CommandName string
SubCommandName *string
SubCommandGroupName *string
Options []*api.Option
Replied bool
}
SlashCommandEvent indicates that a slash api.Command was ran in a api.Guild
func (*SlashCommandEvent) Acknowledge ¶ added in v0.2.0
func (e *SlashCommandEvent) Acknowledge() error
Acknowledge replies to the api.Interaction with api.InteractionResponseTypeDeferredChannelMessageWithSource
func (SlashCommandEvent) CommandPath ¶
func (e SlashCommandEvent) CommandPath() string
CommandPath returns the api.Command path
func (*SlashCommandEvent) DeleteFollowup ¶ added in v0.2.0
func (e *SlashCommandEvent) DeleteFollowup(messageID api.Snowflake) error
DeleteFollowup used to delete a api.FollowupMessage from an api.Interaction
func (*SlashCommandEvent) DeleteOriginal ¶ added in v0.2.0
func (e *SlashCommandEvent) DeleteOriginal() error
DeleteOriginal deletes the original api.InteractionResponse
func (*SlashCommandEvent) EditFollowup ¶ added in v0.2.0
func (e *SlashCommandEvent) EditFollowup(messageID api.Snowflake, followupMessage *api.FollowupMessage) (*api.Message, error)
EditFollowup used to edit a api.FollowupMessage from an api.Interaction
func (*SlashCommandEvent) EditOriginal ¶ added in v0.2.0
func (e *SlashCommandEvent) EditOriginal(followupMessage *api.FollowupMessage) (*api.Message, error)
EditOriginal edits the original api.InteractionResponse
func (SlashCommandEvent) Option ¶ added in v0.2.0
func (e SlashCommandEvent) Option(name string) *api.Option
Option returns an Option by name
func (SlashCommandEvent) OptionN ¶ added in v0.2.0
func (e SlashCommandEvent) OptionN(name string) []*api.Option
OptionN returns Option(s) by name
func (SlashCommandEvent) OptionsT ¶ added in v0.2.0
func (e SlashCommandEvent) OptionsT(optionType api.CommandOptionType) []*api.Option
OptionsT returns Option(s) by api.CommandOptionType
func (*SlashCommandEvent) Reply ¶
func (e *SlashCommandEvent) Reply(response *api.InteractionResponse) error
Reply replies to the api.Interaction with the provided api.InteractionResponse
func (*SlashCommandEvent) SendFollowup ¶ added in v0.2.0
func (e *SlashCommandEvent) SendFollowup(followupMessage *api.FollowupMessage) (*api.Message, error)
SendFollowup used to send a api.FollowupMessage to an api.Interaction
type StoreChannelCreateEvent ¶ added in v0.2.0
type StoreChannelCreateEvent struct {
GenericStoreChannelEvent
}
StoreChannelCreateEvent indicates that a new api.StoreChannel got created in a api.Guild
type StoreChannelDeleteEvent ¶ added in v0.2.0
type StoreChannelDeleteEvent struct {
GenericStoreChannelEvent
}
StoreChannelDeleteEvent indicates that a api.StoreChannel got deleted in a api.Guild
type StoreChannelUpdateEvent ¶ added in v0.2.0
type StoreChannelUpdateEvent struct {
GenericStoreChannelEvent
OldStoreChannel *api.StoreChannel
}
StoreChannelUpdateEvent indicates that a api.StoreChannel got updated in a api.Guild
type TextChannelCreateEvent ¶ added in v0.2.0
type TextChannelCreateEvent struct {
GenericTextChannelEvent
}
TextChannelCreateEvent indicates that a new api.TextChannel got created in a api.Guild
type TextChannelDeleteEvent ¶ added in v0.2.0
type TextChannelDeleteEvent struct {
GenericTextChannelEvent
}
TextChannelDeleteEvent indicates that a api.TextChannel got deleted in a api.Guild
type TextChannelUpdateEvent ¶ added in v0.2.0
type TextChannelUpdateEvent struct {
GenericTextChannelEvent
OldTextChannel *api.TextChannel
}
TextChannelUpdateEvent indicates that a api.TextChannel got updated in a api.Guild
type UserActivityEndEvent ¶ added in v0.2.0
type UserActivityEndEvent struct {
GenericUserActivityEvent
Activity *api.Activity
}
UserActivityEndEvent indicates that a api.User ended a api.Activity(requires the api.IntentsGuildPresences)
type UserActivityStartEvent ¶ added in v0.2.0
type UserActivityStartEvent struct {
GenericUserActivityEvent
Activity *api.Activity
}
UserActivityStartEvent indicates that a api.User started a new api.Activity(requires the api.IntentsGuildPresences)
type UserActivityUpdateEvent ¶ added in v0.2.0
type UserActivityUpdateEvent struct {
GenericUserActivityEvent
NewActivities *api.Activity
OldActivities *api.Activity
}
UserActivityUpdateEvent indicates that a api.User's api.Activity(s) updated(requires the api.IntentsGuildPresences)
type UserTypingEvent ¶ added in v0.2.0
type UserTypingEvent struct {
GenericUserEvent
ChannelID api.Snowflake
}
UserTypingEvent indicates that a api.User started typing in a api.DMChannel or api.TextChannel(requires the api.IntentsDirectMessageTyping and/or api.IntentsGuildMessageTyping)
func (UserTypingEvent) Channel ¶ added in v0.2.0
func (e UserTypingEvent) Channel() *api.Channel
Channel returns the api.Channel the api.User started typing in
func (UserTypingEvent) DMChannel ¶ added in v0.2.0
func (e UserTypingEvent) DMChannel() *api.DMChannel
DMChannel returns the api.DMChannel the api.User started typing in
func (UserTypingEvent) TextChannel ¶ added in v0.2.0
func (e UserTypingEvent) TextChannel() *api.TextChannel
TextChannel returns the api.TextChannel the api.User started typing in
type UserUpdateEvent ¶ added in v0.2.0
type UserUpdateEvent struct {
GenericUserEvent
OldUser *api.User
}
UserUpdateEvent indicates that a api.User updated
type VoiceChannelCreateEvent ¶ added in v0.2.0
type VoiceChannelCreateEvent struct {
GenericVoiceChannelEvent
}
VoiceChannelCreateEvent indicates that a new api.VoiceChannel got created in a api.Guild
type VoiceChannelDeleteEvent ¶ added in v0.2.0
type VoiceChannelDeleteEvent struct {
GenericVoiceChannelEvent
}
VoiceChannelDeleteEvent indicates that a api.VoiceChannel got deleted in a api.Guild
type VoiceChannelUpdateEvent ¶ added in v0.2.0
type VoiceChannelUpdateEvent struct {
GenericVoiceChannelEvent
OldVoiceChannel *api.VoiceChannel
}
VoiceChannelUpdateEvent indicates that a api.VoiceChannel got updated in a api.Guild
Source Files
¶
- application_command_events.go
- category_events.go
- channel_events.go
- dm_events.go
- dm_message_event.go
- dm_message_reaction_events.go
- emote_events.go
- gateway_status_event.go
- generic_event.go
- guild_events.go
- guild_invite_events.go
- guild_member_events.go
- guild_message_events.go
- guild_message_reaction_events.go
- guild_voice_events.go
- heartbeat_event.go
- http_request_events.go
- interaction_events.go
- listener_adapter.go
- message_events.go
- message_reaction_events.go
- raw_gateway_event.go
- ready_event.go
- role_events.go
- self_update_events.go
- store_channel_events.go
- text_channel_events.go
- user_activity_events.go
- user_events.go
- voice_channel_events.go