Documentation
¶
Index ¶
- type ApplicationCommandInteractionCreate
- func (e *ApplicationCommandInteractionCreate) Acknowledge(opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionCreate) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionCreate) Guild() (discord.Guild, bool)
- func (e *ApplicationCommandInteractionCreate) LaunchActivity(opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionCreate) Modal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
- type AutoModerationActionExecution
- type AutoModerationRuleCreate
- type AutoModerationRuleDelete
- type AutoModerationRuleUpdate
- type AutocompleteInteractionCreate
- type ComponentInteractionCreate
- func (e *ComponentInteractionCreate) Acknowledge(opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) DeferUpdateMessage(opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) Guild() (discord.Guild, bool)
- func (e *ComponentInteractionCreate) LaunchActivity(opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) Modal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- type DMChannelPinsUpdate
- type DMMessageCreate
- type DMMessageDelete
- type DMMessagePollVoteAdd
- type DMMessagePollVoteRemove
- type DMMessageReactionAdd
- type DMMessageReactionRemove
- type DMMessageReactionRemoveAll
- type DMMessageReactionRemoveEmoji
- type DMMessageUpdate
- type DMUserTypingStart
- type EmojiCreate
- type EmojiDelete
- type EmojiUpdate
- type EmojisUpdate
- type EntitlementCreate
- type EntitlementDelete
- type EntitlementUpdate
- type GatewayRateLimited
- type GenericAutoModerationRule
- type GenericDMMessage
- type GenericDMMessagePollVote
- type GenericDMMessageReaction
- type GenericEmoji
- type GenericEntitlementEvent
- type GenericEvent
- type GenericGuild
- type GenericGuildChannel
- type GenericGuildMember
- type GenericGuildMessage
- type GenericGuildMessagePollVote
- type GenericGuildMessageReaction
- type GenericGuildScheduledEvent
- type GenericGuildScheduledEventUser
- type GenericGuildSoundboardSound
- type GenericGuildVoiceState
- type GenericIntegration
- type GenericMessage
- type GenericMessagePollVote
- type GenericReaction
- type GenericRole
- type GenericStageInstance
- type GenericSticker
- type GenericSubscriptionEvent
- type GenericThread
- type GenericThreadMember
- type GenericUser
- type GenericUserActivity
- type GuildApplicationCommandPermissionsUpdate
- type GuildAuditLogEntryCreate
- type GuildAvailable
- type GuildBan
- type GuildChannelCreate
- type GuildChannelDelete
- type GuildChannelPinsUpdate
- type GuildChannelUpdate
- type GuildIntegrationsUpdate
- type GuildJoin
- type GuildLeave
- type GuildMemberJoin
- type GuildMemberLeave
- type GuildMemberTypingStart
- type GuildMemberUpdate
- type GuildMessageCreate
- type GuildMessageDelete
- type GuildMessagePollVoteAdd
- type GuildMessagePollVoteRemove
- type GuildMessageReactionAdd
- type GuildMessageReactionRemove
- type GuildMessageReactionRemoveAll
- type GuildMessageReactionRemoveEmoji
- type GuildMessageUpdate
- type GuildReady
- type GuildScheduledEventCreate
- type GuildScheduledEventDelete
- type GuildScheduledEventUpdate
- type GuildScheduledEventUserAdd
- type GuildScheduledEventUserRemove
- type GuildSoundboardSoundCreate
- type GuildSoundboardSoundDelete
- type GuildSoundboardSoundUpdate
- type GuildSoundboardSoundsUpdate
- type GuildUnavailable
- type GuildUnban
- type GuildUpdate
- type GuildVoiceChannelEffectSend
- type GuildVoiceJoin
- type GuildVoiceLeave
- type GuildVoiceMove
- type GuildVoiceStateUpdate
- type GuildsReady
- type HeartbeatAck
- type IntegrationCreate
- type IntegrationDelete
- type IntegrationUpdate
- type InteractionCreate
- type InteractionResponderFunc
- type InviteCreate
- type InviteDelete
- type ListenerAdapter
- type MessageCreate
- type MessageDelete
- type MessagePollVoteAdd
- type MessagePollVoteRemove
- type MessageReactionAdd
- type MessageReactionRemove
- type MessageReactionRemoveAll
- type MessageReactionRemoveEmoji
- type MessageUpdate
- type ModalSubmitInteractionCreate
- func (e *ModalSubmitInteractionCreate) Acknowledge(opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionCreate) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionCreate) DeferUpdateMessage(opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionCreate) Guild() (discord.Guild, bool)
- func (e *ModalSubmitInteractionCreate) LaunchActivity(opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionCreate) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- type PresenceUpdate
- type Raw
- type Ready
- type Resumed
- type RoleCreate
- type RoleDelete
- type RoleUpdate
- type SelfUpdate
- type SoundboardSounds
- type StageInstanceCreate
- type StageInstanceDelete
- type StageInstanceUpdate
- type StickerCreate
- type StickerDelete
- type StickerUpdate
- type StickersUpdate
- type SubscriptionCreate
- type SubscriptionDelete
- type SubscriptionUpdate
- type ThreadCreate
- type ThreadDelete
- type ThreadHide
- type ThreadMemberAdd
- type ThreadMemberRemove
- type ThreadMemberUpdate
- type ThreadShow
- type ThreadUpdate
- type UserActivityStart
- type UserActivityStop
- type UserActivityUpdate
- type UserClientStatusUpdate
- type UserStatusUpdate
- type UserTypingStart
- type UserUpdate
- type VoiceServerUpdate
- type WebhooksUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationCommandInteractionCreate ¶ added in v0.12.0
type ApplicationCommandInteractionCreate struct {
*GenericEvent
discord.ApplicationCommandInteraction
Respond InteractionResponderFunc
}
ApplicationCommandInteractionCreate is the base struct for all application command interaction create events.
func (*ApplicationCommandInteractionCreate) Acknowledge ¶ added in v0.18.15
func (e *ApplicationCommandInteractionCreate) Acknowledge(opts ...rest.RequestOpt) error
Acknowledge acknowledges the interaction.
This is used strictly for acknowledging the HTTP interaction request from discord. This responds with 202 Accepted.
When using this, your first http request must be rest.Interactions.CreateInteractionResponse or rest.Interactions.CreateInteractionResponseWithCallback
This does not produce a visible loading state to the user. You are expected to send a new http request within 3 seconds to respond to the interaction. This allows you to gracefully handle errors with your sent response & access the resulting message.
If you want to create a visible loading state, use DeferCreateMessage.
Source docs: Discord Source docs
func (*ApplicationCommandInteractionCreate) CreateMessage ¶ added in v0.12.0
func (e *ApplicationCommandInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
CreateMessage responds to the interaction with a new message.
func (*ApplicationCommandInteractionCreate) DeferCreateMessage ¶ added in v0.12.0
func (e *ApplicationCommandInteractionCreate) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
DeferCreateMessage responds to the interaction with a "bot is thinking..." message which should be edited later.
func (*ApplicationCommandInteractionCreate) Guild ¶ added in v0.12.0
func (e *ApplicationCommandInteractionCreate) Guild() (discord.Guild, bool)
Guild returns the guild that the interaction happened in if it happened in a guild. If the interaction happened in a DM, it returns nil. This only returns cached guilds.
func (*ApplicationCommandInteractionCreate) LaunchActivity ¶ added in v0.18.11
func (e *ApplicationCommandInteractionCreate) LaunchActivity(opts ...rest.RequestOpt) error
LaunchActivity responds to the interaction by launching activity associated with the app.
func (*ApplicationCommandInteractionCreate) Modal ¶ added in v0.16.11
func (e *ApplicationCommandInteractionCreate) Modal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
Modal responds to the interaction with a new modal.
type AutoModerationActionExecution ¶ added in v0.12.7
type AutoModerationActionExecution struct {
*GenericEvent
gateway.EventAutoModerationActionExecution
}
type AutoModerationRuleCreate ¶ added in v0.12.7
type AutoModerationRuleCreate struct {
*GenericAutoModerationRule
}
type AutoModerationRuleDelete ¶ added in v0.12.7
type AutoModerationRuleDelete struct {
*GenericAutoModerationRule
}
type AutoModerationRuleUpdate ¶ added in v0.12.7
type AutoModerationRuleUpdate struct {
*GenericAutoModerationRule
}
type AutocompleteInteractionCreate ¶ added in v0.12.0
type AutocompleteInteractionCreate struct {
*GenericEvent
discord.AutocompleteInteraction
Respond InteractionResponderFunc
}
AutocompleteInteractionCreate indicates that a new autocomplete interaction has been created.
func (*AutocompleteInteractionCreate) Acknowledge ¶ added in v0.18.15
func (e *AutocompleteInteractionCreate) Acknowledge(opts ...rest.RequestOpt) error
Acknowledge acknowledges the interaction.
This is used strictly for acknowledging the HTTP interaction request from discord. This responds with 202 Accepted.
When using this, your first http request must be rest.Interactions.CreateInteractionResponse or rest.Interactions.CreateInteractionResponseWithCallback
This does not produce a visible loading state to the user. You are expected to send a new http request within 3 seconds to respond to the interaction. This allows you to gracefully handle errors with your sent response & access the resulting message.
If you want to create a visible loading state, use DeferCreateMessage.
Source docs: Discord Source docs
func (*AutocompleteInteractionCreate) AutocompleteResult ¶ added in v0.16.11
func (e *AutocompleteInteractionCreate) AutocompleteResult(choices []discord.AutocompleteChoice, opts ...rest.RequestOpt) error
AutocompleteResult responds to the interaction with a slice of choices.
func (*AutocompleteInteractionCreate) Guild ¶ added in v0.12.0
func (e *AutocompleteInteractionCreate) Guild() (discord.Guild, bool)
Guild returns the guild that the interaction happened in if it happened in a guild. If the interaction happened in a DM, it returns nil. This only returns cached guilds.
type ComponentInteractionCreate ¶ added in v0.12.0
type ComponentInteractionCreate struct {
*GenericEvent
discord.ComponentInteraction
Respond InteractionResponderFunc
}
ComponentInteractionCreate indicates that a new component interaction has been created.
func (*ComponentInteractionCreate) Acknowledge ¶ added in v0.18.15
func (e *ComponentInteractionCreate) Acknowledge(opts ...rest.RequestOpt) error
Acknowledge acknowledges the interaction.
This is used strictly for acknowledging the HTTP interaction request from discord. This responds with 202 Accepted.
When using this, your first http request must be rest.Interactions.CreateInteractionResponse or rest.Interactions.CreateInteractionResponseWithCallback
This does not produce a visible loading state to the user. You are expected to send a new http request within 3 seconds to respond to the interaction. This allows you to gracefully handle errors with your sent response & access the resulting message.
If you want to create a visible loading state, use DeferCreateMessage.
Source docs: Discord Source docs
func (*ComponentInteractionCreate) CreateMessage ¶ added in v0.12.0
func (e *ComponentInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
CreateMessage responds to the interaction with a new message.
func (*ComponentInteractionCreate) DeferCreateMessage ¶ added in v0.12.0
func (e *ComponentInteractionCreate) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
DeferCreateMessage responds to the interaction with a "bot is thinking..." message which should be edited later.
func (*ComponentInteractionCreate) DeferUpdateMessage ¶ added in v0.12.0
func (e *ComponentInteractionCreate) DeferUpdateMessage(opts ...rest.RequestOpt) error
DeferUpdateMessage responds to the interaction with nothing.
func (*ComponentInteractionCreate) Guild ¶ added in v0.12.0
func (e *ComponentInteractionCreate) Guild() (discord.Guild, bool)
Guild returns the guild that the interaction happened in if it happened in a guild. If the interaction happened in a DM, it returns nil. This only returns cached guilds.
func (*ComponentInteractionCreate) LaunchActivity ¶ added in v0.18.11
func (e *ComponentInteractionCreate) LaunchActivity(opts ...rest.RequestOpt) error
LaunchActivity responds to the interaction by launching activity associated with the app.
func (*ComponentInteractionCreate) Modal ¶ added in v0.16.11
func (e *ComponentInteractionCreate) Modal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
Modal responds to the interaction with a new modal.
func (*ComponentInteractionCreate) UpdateMessage ¶ added in v0.12.0
func (e *ComponentInteractionCreate) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
UpdateMessage responds to the interaction with updating the message the component is from.
type DMChannelPinsUpdate ¶ added in v0.12.0
type DMChannelPinsUpdate struct {
*GenericEvent
ChannelID snowflake.ID
NewLastPinTimestamp *time.Time
}
DMChannelPinsUpdate indicates that a discord.Message got pinned or unpinned.
type DMMessageCreate ¶ added in v0.12.0
type DMMessageCreate struct {
*GenericDMMessage
}
DMMessageCreate is called upon receiving a discord.Message in a Channel (requires gateway.IntentsDirectMessage)
type DMMessageDelete ¶ added in v0.12.0
type DMMessageDelete struct {
*GenericDMMessage
}
DMMessageDelete is called upon deleting a discord.Message in a Channel (requires gateway.IntentsDirectMessage)
type DMMessagePollVoteAdd ¶ added in v0.18.3
type DMMessagePollVoteAdd struct {
*GenericDMMessagePollVote
}
DMMessagePollVoteAdd indicates that a discord.User voted on a discord.Poll in a DM (requires gateway.IntentDirectMessagePolls)
type DMMessagePollVoteRemove ¶ added in v0.18.3
type DMMessagePollVoteRemove struct {
*GenericDMMessagePollVote
}
DMMessagePollVoteRemove indicates that a discord.User removed their vote on a discord.Poll in a DM (requires gateway.IntentDirectMessagePolls)
type DMMessageReactionAdd ¶ added in v0.12.0
type DMMessageReactionAdd struct {
*GenericDMMessageReaction
MessageAuthorID *snowflake.ID
}
DMMessageReactionAdd indicates that a discord.User added a discord.MessageReaction to a discord.Message in a Channel (requires the gateway.IntentDirectMessageReactions)
type DMMessageReactionRemove ¶ added in v0.12.0
type DMMessageReactionRemove struct {
*GenericDMMessageReaction
}
DMMessageReactionRemove indicates that a discord.User removed a discord.MessageReaction from a discord.Message in a Channel (requires the gateway.IntentDirectMessageReactions)
type DMMessageReactionRemoveAll ¶ added in v0.12.0
type DMMessageReactionRemoveAll struct {
*GenericEvent
ChannelID snowflake.ID
MessageID snowflake.ID
}
DMMessageReactionRemoveAll indicates someone removed all discord.MessageReaction(s) from a discord.Message in a Channel (requires the gateway.IntentDirectMessageReactions)
type DMMessageReactionRemoveEmoji ¶ added in v0.12.0
type DMMessageReactionRemoveEmoji struct {
*GenericEvent
ChannelID snowflake.ID
MessageID snowflake.ID
Emoji discord.PartialEmoji
}
DMMessageReactionRemoveEmoji indicates someone removed all discord.MessageReaction(s) of a specific discord.Emoji from a discord.Message in a Channel (requires the gateway.IntentDirectMessageReactions)
type DMMessageUpdate ¶ added in v0.12.0
type DMMessageUpdate struct {
*GenericDMMessage
OldMessage discord.Message
}
DMMessageUpdate is called upon editing a discord.Message in a Channel (requires gateway.IntentsDirectMessage)
type DMUserTypingStart ¶ added in v0.12.0
type DMUserTypingStart struct {
*GenericEvent
ChannelID snowflake.ID
UserID snowflake.ID
Timestamp time.Time
}
DMUserTypingStart indicates that a discord.User started typing in a discord.DMChannel(requires gateway.IntentDirectMessageTyping).
type EmojiCreate ¶ added in v0.12.0
type EmojiCreate struct {
*GenericEmoji
}
EmojiCreate indicates that a new discord.Emoji got created in a discord.Guild (requires gateway.IntentGuildExpressions)
type EmojiDelete ¶ added in v0.12.0
type EmojiDelete struct {
*GenericEmoji
}
EmojiDelete indicates that a discord.Emoji got deleted in a discord.Guild (requires gateway.IntentGuildExpressions)
type EmojiUpdate ¶ added in v0.12.0
type EmojiUpdate struct {
*GenericEmoji
OldEmoji discord.Emoji
}
EmojiUpdate indicates that a discord.Emoji got updated in a discord.Guild (requires gateway.IntentGuildExpressions)
type EmojisUpdate ¶ added in v0.12.0
type EmojisUpdate struct {
*GenericEvent
gateway.EventGuildEmojisUpdate
}
EmojisUpdate is dispatched when a guild's emojis are updated. This event does not depend on a cache like EmojiCreate, EmojiUpdate or EmojiDelete.
type EntitlementCreate ¶ added in v0.16.11
type EntitlementCreate struct {
*GenericEntitlementEvent
}
type EntitlementDelete ¶ added in v0.16.11
type EntitlementDelete struct {
*GenericEntitlementEvent
}
type EntitlementUpdate ¶ added in v0.16.11
type EntitlementUpdate struct {
*GenericEntitlementEvent
}
type GatewayRateLimited ¶ added in v0.19.0
type GatewayRateLimited struct {
*GenericEvent
gateway.EventRateLimited
}
GatewayRateLimited indicates we received a RateLimited from the gateway.Gateway
type GenericAutoModerationRule ¶ added in v0.12.7
type GenericAutoModerationRule struct {
*GenericEvent
discord.AutoModerationRule
}
type GenericDMMessage ¶ added in v0.12.0
type GenericDMMessage struct {
*GenericEvent
MessageID snowflake.ID
Message discord.Message
ChannelID snowflake.ID
}
GenericDMMessage is called upon receiving DMMessageCreate , DMMessageUpdate , DMMessageDelete , GenericDMMessageReaction , DMMessageReactionAdd , DMMessageReactionRemove , DMMessageReactionRemoveEmoji or DMMessageReactionRemoveAll (requires gateway.IntentsDirectMessage)
type GenericDMMessagePollVote ¶ added in v0.18.3
type GenericDMMessagePollVote struct {
*GenericEvent
UserID snowflake.ID
ChannelID snowflake.ID
MessageID snowflake.ID
AnswerID int
}
GenericDMMessagePollVote is called upon receiving DMMessagePollVoteAdd or DMMessagePollVoteRemove (requires gateway.IntentDirectMessagePolls)
type GenericDMMessageReaction ¶ added in v0.12.0
type GenericDMMessageReaction struct {
*GenericEvent
UserID snowflake.ID
ChannelID snowflake.ID
MessageID snowflake.ID
Emoji discord.PartialEmoji
BurstColors []string
Burst bool
}
GenericDMMessageReaction is called upon receiving DMMessageReactionAdd or DMMessageReactionRemove (requires the gateway.IntentDirectMessageReactions)
type GenericEmoji ¶ added in v0.12.0
type GenericEmoji struct {
*GenericEvent
GuildID snowflake.ID
Emoji discord.Emoji
}
GenericEmoji is called upon receiving EmojiCreate , EmojiUpdate or EmojiDelete (requires gateway.IntentGuildExpressions)
type GenericEntitlementEvent ¶ added in v0.16.11
type GenericEntitlementEvent struct {
*GenericEvent
discord.Entitlement
}
type GenericEvent ¶
type GenericEvent struct {
// contains filtered or unexported fields
}
GenericEvent the base event structure
func NewGenericEvent ¶
func NewGenericEvent(client *bot.Client, sequenceNumber int, shardID int) *GenericEvent
NewGenericEvent constructs a new GenericEvent with the provided Client instance
func (*GenericEvent) Client ¶
func (e *GenericEvent) Client() *bot.Client
Client returns the bot.Client instance that dispatched the event
func (*GenericEvent) SequenceNumber ¶
func (e *GenericEvent) SequenceNumber() int
SequenceNumber returns the sequence number of the gateway event
func (*GenericEvent) ShardID ¶ added in v0.11.0
func (e *GenericEvent) ShardID() int
ShardID returns the shard ID the event was dispatched from
type GenericGuild ¶ added in v0.12.0
type GenericGuild struct {
*GenericEvent
GuildID snowflake.ID
}
GenericGuild represents a generic guild event
type GenericGuildChannel ¶ added in v0.12.0
type GenericGuildChannel struct {
*GenericEvent
ChannelID snowflake.ID
Channel discord.GuildChannel
GuildID snowflake.ID
}
GenericGuildChannel is called upon receiving GuildChannelCreate , GuildChannelUpdate or GuildChannelDelete
type GenericGuildMember ¶ added in v0.12.0
type GenericGuildMember struct {
*GenericEvent
GuildID snowflake.ID
Member discord.Member
}
GenericGuildMember generic discord.Member event
type GenericGuildMessage ¶ added in v0.12.0
type GenericGuildMessage struct {
*GenericEvent
MessageID snowflake.ID
Message discord.Message
ChannelID snowflake.ID
GuildID snowflake.ID
}
GenericGuildMessage is called upon receiving GuildMessageCreate , GuildMessageUpdate or GuildMessageDelete
func (*GenericGuildMessage) Channel ¶ added in v0.12.0
func (e *GenericGuildMessage) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.GuildMessageChannel where the GenericGuildMessage happened
type GenericGuildMessagePollVote ¶ added in v0.18.3
type GenericGuildMessagePollVote struct {
*GenericEvent
UserID snowflake.ID
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID snowflake.ID
AnswerID int
}
GenericGuildMessagePollVote is called upon receiving GuildMessagePollVoteAdd or GuildMessagePollVoteRemove (requires gateway.IntentGuildMessagePolls)
func (*GenericGuildMessagePollVote) Channel ¶ added in v0.18.3
func (e *GenericGuildMessagePollVote) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.GuildMessageChannel where the GenericGuildMessagePollVote happened
type GenericGuildMessageReaction ¶ added in v0.12.0
type GenericGuildMessageReaction struct {
*GenericEvent
UserID snowflake.ID
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID snowflake.ID
Emoji discord.PartialEmoji
BurstColors []string
Burst bool
}
GenericGuildMessageReaction is called upon receiving GuildMessageReactionAdd or GuildMessageReactionRemove
type GenericGuildScheduledEvent ¶ added in v0.12.0
type GenericGuildScheduledEvent struct {
*GenericEvent
GuildScheduled discord.GuildScheduledEvent
}
GenericGuildScheduledEvent is the base struct for all GuildScheduledEvents events.
type GenericGuildScheduledEventUser ¶ added in v0.12.0
type GenericGuildScheduledEventUser struct {
*GenericEvent
GuildScheduledEventID snowflake.ID
UserID snowflake.ID
GuildID snowflake.ID
}
GenericGuildScheduledEventUser is the base struct for all GuildScheduledEventUser events.
func (*GenericGuildScheduledEventUser) GuildScheduledEvent ¶ added in v0.12.0
func (e *GenericGuildScheduledEventUser) GuildScheduledEvent() (discord.GuildScheduledEvent, bool)
GuildScheduledEvent returns the discord.GuildScheduledEvent the event is for.
type GenericGuildSoundboardSound ¶ added in v0.18.13
type GenericGuildSoundboardSound struct {
*GenericEvent
discord.SoundboardSound
}
GenericGuildSoundboardSound is called upon receiving GuildSoundboardSoundCreate and GuildSoundboardSoundUpdate (requires gateway.IntentGuildExpressions)
type GenericGuildVoiceState ¶ added in v0.12.0
type GenericGuildVoiceState struct {
*GenericEvent
VoiceState discord.VoiceState
Member discord.Member
}
GenericGuildVoiceState is called upon receiving GuildVoiceJoin, GuildVoiceMove and GuildVoiceLeave
type GenericIntegration ¶ added in v0.12.0
type GenericIntegration struct {
*GenericEvent
GuildID snowflake.ID
Integration discord.Integration
}
GenericIntegration is called upon receiving IntegrationCreate, IntegrationUpdate or IntegrationDelete(requires the gateway.IntentGuildIntegrations)
type GenericMessage ¶ added in v0.12.0
type GenericMessage struct {
*GenericEvent
MessageID snowflake.ID
Message discord.Message
ChannelID snowflake.ID
GuildID *snowflake.ID
}
GenericMessage generic discord.Message event
func (*GenericMessage) Channel ¶ added in v0.12.0
func (e *GenericMessage) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.GuildMessageChannel where the GenericMessage happened
type GenericMessagePollVote ¶ added in v0.18.3
type GenericMessagePollVote struct {
*GenericEvent
UserID snowflake.ID
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID *snowflake.ID
AnswerID int
}
GenericMessagePollVote is a generic poll vote event (requires gateway.IntentGuildMessagePolls and/or gateway.IntentDirectMessagePolls)
type GenericReaction ¶ added in v0.12.0
type GenericReaction struct {
*GenericEvent
UserID snowflake.ID
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID *snowflake.ID
Emoji discord.PartialEmoji
BurstColors []string
Burst bool
}
GenericReaction is called upon receiving MessageReactionAdd or MessageReactionRemove
type GenericRole ¶ added in v0.12.0
type GenericRole struct {
*GenericEvent
GuildID snowflake.ID
RoleID snowflake.ID
Role discord.Role
}
GenericRole generic discord.Role event
type GenericStageInstance ¶ added in v0.12.0
type GenericStageInstance struct {
*GenericEvent
StageInstanceID snowflake.ID
StageInstance discord.StageInstance
}
GenericStageInstance generic StageInstance event
type GenericSticker ¶ added in v0.12.0
type GenericSticker struct {
*GenericEvent
GuildID snowflake.ID
Sticker discord.Sticker
}
GenericSticker is called upon receiving StickerCreate , StickerUpdate or StickerDelete (requires gateway.IntentGuildExpressions)
type GenericSubscriptionEvent ¶ added in v0.18.11
type GenericSubscriptionEvent struct {
*GenericEvent
discord.Subscription
}
type GenericThread ¶ added in v0.12.0
type GenericThread struct {
*GenericEvent
Thread discord.GuildThread
ThreadID snowflake.ID
GuildID snowflake.ID
ParentID snowflake.ID
}
GenericThread is the base struct for all Thread events.
type GenericThreadMember ¶ added in v0.12.0
type GenericThreadMember struct {
*GenericEvent
GuildID snowflake.ID
ThreadID snowflake.ID
ThreadMemberID snowflake.ID
ThreadMember discord.ThreadMember
}
GenericThreadMember is the base struct for all ThreadMember events.
type GenericUser ¶ added in v0.12.0
type GenericUser struct {
*GenericEvent
UserID snowflake.ID
User discord.User
}
GenericUser is called upon receiving UserUpdate or UserTypingStart
type GenericUserActivity ¶ added in v0.12.0
type GenericUserActivity struct {
*GenericEvent
UserID snowflake.ID
GuildID snowflake.ID
Activity discord.Activity
}
GenericUserActivity generic Activity event
type GuildApplicationCommandPermissionsUpdate ¶ added in v0.10.0
type GuildApplicationCommandPermissionsUpdate struct {
*GenericEvent
Permissions discord.ApplicationCommandPermissions
}
GuildApplicationCommandPermissionsUpdate indicates that a Guild's application's permissions were updated
type GuildAuditLogEntryCreate ¶ added in v0.15.0
type GuildAuditLogEntryCreate struct {
*GenericGuild
AuditLogEntry discord.AuditLogEntry
}
GuildAuditLogEntryCreate is called when a new discord.AuditLogEntry is created
type GuildAvailable ¶ added in v0.12.0
type GuildAvailable struct {
*GenericGuild
Guild discord.GatewayGuild
}
GuildAvailable is called when an unavailable discord.Guild becomes available
type GuildBan ¶ added in v0.12.0
type GuildBan struct {
*GenericGuild
User discord.User
}
GuildBan is called when a discord.Member/discord.User is banned from the discord.Guild
type GuildChannelCreate ¶ added in v0.12.0
type GuildChannelCreate struct {
*GenericGuildChannel
}
GuildChannelCreate indicates that a new Channel got created in a discord.Guild
type GuildChannelDelete ¶ added in v0.12.0
type GuildChannelDelete struct {
*GenericGuildChannel
}
GuildChannelDelete indicates that a Channel got deleted in a discord.Guild
type GuildChannelPinsUpdate ¶ added in v0.12.0
type GuildChannelPinsUpdate struct {
*GenericEvent
GuildID snowflake.ID
ChannelID snowflake.ID
NewLastPinTimestamp *time.Time
OldLastPinTimestamp *time.Time
}
GuildChannelPinsUpdate indicates a discord.Message got pinned or unpinned in a discord.GuildMessageChannel
type GuildChannelUpdate ¶ added in v0.12.0
type GuildChannelUpdate struct {
*GenericGuildChannel
OldChannel discord.GuildChannel
}
GuildChannelUpdate indicates that a Channel got updated in a discord.Guild
type GuildIntegrationsUpdate ¶ added in v0.12.0
type GuildIntegrationsUpdate struct {
*GenericEvent
GuildID snowflake.ID
}
GuildIntegrationsUpdate indicates that a Guild's integrations were updated
type GuildJoin ¶ added in v0.12.0
type GuildJoin struct {
*GenericGuild
Guild discord.GatewayGuild
}
GuildJoin is called when the bot joins a discord.Guild
type GuildLeave ¶ added in v0.12.0
type GuildLeave struct {
*GenericGuild
Guild discord.Guild // the old cached guild
}
GuildLeave is called when the bot leaves a discord.Guild
type GuildMemberJoin ¶ added in v0.12.0
type GuildMemberJoin struct {
*GenericGuildMember
}
GuildMemberJoin indicates that a discord.Member joined the discord.Guild
type GuildMemberLeave ¶ added in v0.12.0
type GuildMemberLeave struct {
*GenericEvent
GuildID snowflake.ID
User discord.User
Member discord.Member
}
GuildMemberLeave indicates that a discord.Member left the discord.Guild
type GuildMemberTypingStart ¶ added in v0.12.0
type GuildMemberTypingStart struct {
*GenericEvent
ChannelID snowflake.ID
UserID snowflake.ID
GuildID snowflake.ID
Timestamp time.Time
Member discord.Member
}
GuildMemberTypingStart indicates that a discord.Member started typing in a discord.BaseGuildMessageChannel(requires gateway.IntentGuildMessageTyping) Member will be empty when event is triggered by Clyde bot
func (*GuildMemberTypingStart) Channel ¶ added in v0.12.0
func (e *GuildMemberTypingStart) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.GuildMessageChannel the GuildMemberTypingStart happened in
type GuildMemberUpdate ¶ added in v0.12.0
type GuildMemberUpdate struct {
*GenericGuildMember
OldMember discord.Member
}
GuildMemberUpdate indicates that a discord.Member updated
type GuildMessageCreate ¶ added in v0.12.0
type GuildMessageCreate struct {
*GenericGuildMessage
}
GuildMessageCreate is called upon receiving a discord.Message in a Channel
type GuildMessageDelete ¶ added in v0.12.0
type GuildMessageDelete struct {
*GenericGuildMessage
}
GuildMessageDelete is called upon deleting a discord.Message in a Channel
type GuildMessagePollVoteAdd ¶ added in v0.18.3
type GuildMessagePollVoteAdd struct {
*GenericGuildMessagePollVote
}
GuildMessagePollVoteAdd indicates that a discord.User voted on a discord.Poll in a discord.Guild (requires gateway.IntentGuildMessagePolls)
type GuildMessagePollVoteRemove ¶ added in v0.18.3
type GuildMessagePollVoteRemove struct {
*GenericGuildMessagePollVote
}
GuildMessagePollVoteRemove indicates that a discord.User removed their vote on a discord.Poll in a discord.Guild (requires gateway.IntentGuildMessagePolls)
type GuildMessageReactionAdd ¶ added in v0.12.0
type GuildMessageReactionAdd struct {
*GenericGuildMessageReaction
Member discord.Member
MessageAuthorID *snowflake.ID
}
GuildMessageReactionAdd indicates that a discord.Member added a discord.PartialEmoji to a discord.Message in a discord.GuildMessageChannel(requires the gateway.IntentGuildMessageReactions)
type GuildMessageReactionRemove ¶ added in v0.12.0
type GuildMessageReactionRemove struct {
*GenericGuildMessageReaction
}
GuildMessageReactionRemove indicates that a discord.Member removed a discord.MessageReaction from a discord.Message in a Channel (requires the gateway.IntentGuildMessageReactions)
type GuildMessageReactionRemoveAll ¶ added in v0.12.0
type GuildMessageReactionRemoveAll struct {
*GenericEvent
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID snowflake.ID
}
GuildMessageReactionRemoveAll indicates someone removed all discord.MessageReaction(s) from a discord.Message in a Channel (requires the gateway.IntentGuildMessageReactions)
type GuildMessageReactionRemoveEmoji ¶ added in v0.12.0
type GuildMessageReactionRemoveEmoji struct {
*GenericEvent
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID snowflake.ID
Emoji discord.PartialEmoji
}
GuildMessageReactionRemoveEmoji indicates someone removed all discord.MessageReaction of a specific discord.Emoji from a discord.Message in a Channel (requires the gateway.IntentGuildMessageReactions)
type GuildMessageUpdate ¶ added in v0.12.0
type GuildMessageUpdate struct {
*GenericGuildMessage
OldMessage discord.Message
}
GuildMessageUpdate is called upon editing a discord.Message in a Channel
type GuildReady ¶ added in v0.12.0
type GuildReady struct {
*GenericGuild
Guild discord.GatewayGuild
}
GuildReady is called when a discord.Guild becomes loaded for the first time
type GuildScheduledEventCreate ¶ added in v0.12.0
type GuildScheduledEventCreate struct {
*GenericGuildScheduledEvent
}
GuildScheduledEventCreate is dispatched when a guild scheduled event is created.
type GuildScheduledEventDelete ¶ added in v0.12.0
type GuildScheduledEventDelete struct {
*GenericGuildScheduledEvent
}
GuildScheduledEventDelete is dispatched when a guild scheduled event is deleted.
type GuildScheduledEventUpdate ¶ added in v0.12.0
type GuildScheduledEventUpdate struct {
*GenericGuildScheduledEvent
OldGuildScheduled discord.GuildScheduledEvent
}
GuildScheduledEventUpdate is dispatched when a guild scheduled event is updated.
type GuildScheduledEventUserAdd ¶ added in v0.12.0
type GuildScheduledEventUserAdd struct {
*GenericGuildScheduledEventUser
}
GuildScheduledEventUserAdd is dispatched when a user is added to a discord.GuildScheduledEvent.
type GuildScheduledEventUserRemove ¶ added in v0.12.0
type GuildScheduledEventUserRemove struct {
*GenericGuildScheduledEventUser
}
GuildScheduledEventUserRemove is dispatched when a user is removed from a discord.GuildScheduledEvent.
type GuildSoundboardSoundCreate ¶ added in v0.18.13
type GuildSoundboardSoundCreate struct {
*GenericGuildSoundboardSound
}
GuildSoundboardSoundCreate indicates that a discord.SoundboardSound was created in a discord.Guild (requires gateway.IntentGuildExpressions)
type GuildSoundboardSoundDelete ¶ added in v0.18.13
type GuildSoundboardSoundDelete struct {
*GenericEvent
SoundID snowflake.ID
GuildID snowflake.ID
}
GuildSoundboardSoundDelete indicates that a discord.SoundboardSound was deleted in a discord.Guild (requires gateway.IntentGuildExpressions)
type GuildSoundboardSoundUpdate ¶ added in v0.18.13
type GuildSoundboardSoundUpdate struct {
*GenericGuildSoundboardSound
OldGuildSoundboardSound discord.SoundboardSound
}
GuildSoundboardSoundUpdate indicates that a discord.SoundboardSound was updated in a discord.Guild (requires gateway.IntentGuildExpressions)
type GuildSoundboardSoundsUpdate ¶ added in v0.18.13
type GuildSoundboardSoundsUpdate struct {
*GenericEvent
SoundboardSounds []discord.SoundboardSound
GuildID snowflake.ID
}
GuildSoundboardSoundsUpdate indicates when multiple discord.Guild soundboard sounds were updated (requires gateway.IntentGuildExpressions)
type GuildUnavailable ¶ added in v0.12.0
type GuildUnavailable struct {
}
GuildUnavailable is called when an available discord.Guild becomes unavailable
type GuildUnban ¶ added in v0.12.0
type GuildUnban struct {
*GenericGuild
User discord.User
}
GuildUnban is called when a discord.Member/discord.User is unbanned from the discord.Guild
type GuildUpdate ¶ added in v0.12.0
type GuildUpdate struct {
*GenericGuild
Guild discord.Guild
OldGuild discord.Guild // the old cached guild
}
GuildUpdate is called upon receiving discord.Guild updates
type GuildVoiceChannelEffectSend ¶ added in v0.18.11
type GuildVoiceChannelEffectSend struct {
*GenericEvent
gateway.EventVoiceChannelEffectSend
}
GuildVoiceChannelEffectSend indicates that a discord.Member sent an effect in a discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceJoin ¶ added in v0.12.0
type GuildVoiceJoin struct {
*GenericGuildVoiceState
}
GuildVoiceJoin indicates that a discord.Member joined a discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceLeave ¶ added in v0.12.0
type GuildVoiceLeave struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
}
GuildVoiceLeave indicates that a discord.Member left a discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceMove ¶ added in v0.12.0
type GuildVoiceMove struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
}
GuildVoiceMove indicates that a discord.Member was moved to a different discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceStateUpdate ¶ added in v0.12.0
type GuildVoiceStateUpdate struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
}
GuildVoiceStateUpdate indicates that the discord.VoiceState of a discord.Member has updated (requires gateway.IntentGuildVoiceStates)
type GuildsReady ¶ added in v0.12.0
type GuildsReady struct {
*GenericEvent
}
GuildsReady is called when all discord.Guild(s) are loaded after logging in
type HeartbeatAck ¶ added in v0.16.0
type HeartbeatAck struct {
*GenericEvent
gateway.EventHeartbeatAck
}
type IntegrationCreate ¶ added in v0.12.0
type IntegrationCreate struct {
*GenericIntegration
}
IntegrationCreate indicates that a new Integration was created in a Guild
type IntegrationDelete ¶ added in v0.12.0
type IntegrationDelete struct {
*GenericEvent
ID snowflake.ID
GuildID snowflake.ID
ApplicationID *snowflake.ID
}
IntegrationDelete indicates that an Integration was deleted from a Guild
type IntegrationUpdate ¶ added in v0.12.0
type IntegrationUpdate struct {
*GenericIntegration
}
IntegrationUpdate indicates that an integration was updated in a Guild
type InteractionCreate ¶ added in v0.12.0
type InteractionCreate struct {
*GenericEvent
discord.Interaction
Respond InteractionResponderFunc
}
InteractionCreate indicates that a new interaction has been created.
type InteractionResponderFunc ¶
type InteractionResponderFunc func(responseType discord.InteractionResponseType, data discord.InteractionResponseData, opts ...rest.RequestOpt) error
InteractionResponderFunc is a function that can be used to respond to a discord.Interaction.
type InviteCreate ¶ added in v0.12.0
type InviteCreate struct {
*GenericEvent
gateway.EventInviteCreate
}
InviteCreate is called upon creation of a new discord.Invite (requires gateway.IntentGuildInvites)
func (*InviteCreate) Channel ¶ added in v0.18.10
func (e *InviteCreate) Channel() (discord.GuildChannel, bool)
Channel returns the discord.GuildChannel the GenericInvite happened in.
type InviteDelete ¶ added in v0.12.0
InviteDelete is called upon deletion of a discord.Invite (requires gateway.IntentGuildInvites)
func (*InviteDelete) Channel ¶ added in v0.18.10
func (e *InviteDelete) Channel() (discord.GuildChannel, bool)
Channel returns the discord.GuildChannel the GenericInvite happened in.
type ListenerAdapter ¶
type ListenerAdapter struct {
// raw event
OnRaw func(event *Raw)
// heartbeat ack event
OnHeartbeatAck func(event *HeartbeatAck)
// gateway ratelimited event
OnGatewayRateLimited func(event *GatewayRateLimited)
// GuildApplicationCommandPermissionsUpdate
OnGuildApplicationCommandPermissionsUpdate func(event *GuildApplicationCommandPermissionsUpdate)
// AutoModeration
OnAutoModerationRuleCreate func(event *AutoModerationRuleCreate)
OnAutoModerationRuleUpdate func(event *AutoModerationRuleUpdate)
OnAutoModerationRuleDelete func(event *AutoModerationRuleDelete)
OnAutoModerationActionExecution func(event *AutoModerationActionExecution)
// Thread Events
OnThreadCreate func(event *ThreadCreate)
OnThreadUpdate func(event *ThreadUpdate)
OnThreadDelete func(event *ThreadDelete)
OnThreadShow func(event *ThreadShow)
OnThreadHide func(event *ThreadHide)
// ThreadMember Events
OnThreadMemberAdd func(event *ThreadMemberAdd)
OnThreadMemberUpdate func(event *ThreadMemberUpdate)
OnThreadMemberRemove func(event *ThreadMemberRemove)
// Guild Channel Events
OnGuildChannelCreate func(event *GuildChannelCreate)
OnGuildChannelUpdate func(event *GuildChannelUpdate)
OnGuildChannelDelete func(event *GuildChannelDelete)
OnGuildChannelPinsUpdate func(event *GuildChannelPinsUpdate)
// DM Channel Events
OnDMChannelPinsUpdate func(event *DMChannelPinsUpdate)
// Channel Message Events
OnDMMessageCreate func(event *DMMessageCreate)
OnDMMessageUpdate func(event *DMMessageUpdate)
OnDMMessageDelete func(event *DMMessageDelete)
// Channel Reaction Events
OnDMMessageReactionAdd func(event *DMMessageReactionAdd)
OnDMMessageReactionRemove func(event *DMMessageReactionRemove)
OnDMMessageReactionRemoveEmoji func(event *DMMessageReactionRemoveEmoji)
OnDMMessageReactionRemoveAll func(event *DMMessageReactionRemoveAll)
// Emoji Events
OnEmojisUpdate func(event *EmojisUpdate)
OnEmojiCreate func(event *EmojiCreate)
OnEmojiUpdate func(event *EmojiUpdate)
OnEmojiDelete func(event *EmojiDelete)
// Entitlement Events
OnEntitlementCreate func(event *EntitlementCreate)
OnEntitlementUpdate func(event *EntitlementUpdate)
OnEntitlementDelete func(event *EntitlementDelete)
// Subscription Events
OnSubscriptionCreate func(event *SubscriptionCreate)
OnSubscriptionUpdate func(event *SubscriptionUpdate)
OnSubscriptionDelete func(event *SubscriptionDelete)
// Sticker Events
OnStickersUpdate func(event *StickersUpdate)
OnStickerCreate func(event *StickerCreate)
OnStickerUpdate func(event *StickerUpdate)
OnStickerDelete func(event *StickerDelete)
// gateway status Events
OnReady func(event *Ready)
OnResumed func(event *Resumed)
// Guild Events
OnGuildJoin func(event *GuildJoin)
OnGuildUpdate func(event *GuildUpdate)
OnGuildLeave func(event *GuildLeave)
OnGuildAvailable func(event *GuildAvailable)
OnGuildReady func(event *GuildReady)
OnGuildsReady func(event *GuildsReady)
OnGuildBan func(event *GuildBan)
OnGuildUnban func(event *GuildUnban)
OnGuildAuditLogEntryCreate func(event *GuildAuditLogEntryCreate)
// Guild Invite Events
OnGuildInviteCreate func(event *InviteCreate)
OnGuildInviteDelete func(event *InviteDelete)
// Guild Member Events
OnGuildMemberJoin func(event *GuildMemberJoin)
OnGuildMemberUpdate func(event *GuildMemberUpdate)
OnGuildMemberLeave func(event *GuildMemberLeave)
// Guild Message Events
OnGuildMessageCreate func(event *GuildMessageCreate)
OnGuildMessageUpdate func(event *GuildMessageUpdate)
OnGuildMessageDelete func(event *GuildMessageDelete)
// Guild Message Reaction Events
OnGuildMessageReactionAdd func(event *GuildMessageReactionAdd)
OnGuildMessageReactionRemove func(event *GuildMessageReactionRemove)
OnGuildMessageReactionRemoveEmoji func(event *GuildMessageReactionRemoveEmoji)
OnGuildMessageReactionRemoveAll func(event *GuildMessageReactionRemoveAll)
// Guild Soundboard Events
OnGuildSoundboardSoundCreate func(event *GuildSoundboardSoundCreate)
OnGuildSoundboardSoundUpdate func(event *GuildSoundboardSoundUpdate)
OnGuildSoundboardSoundDelete func(event *GuildSoundboardSoundDelete)
OnGuildSoundboardSoundsUpdate func(event *GuildSoundboardSoundsUpdate)
OnSoundboardSounds func(event *SoundboardSounds)
// Guild Voice Events
OnVoiceServerUpdate func(event *VoiceServerUpdate)
OnGuildVoiceChannelEffectSend func(event *GuildVoiceChannelEffectSend)
OnGuildVoiceStateUpdate func(event *GuildVoiceStateUpdate)
OnGuildVoiceJoin func(event *GuildVoiceJoin)
OnGuildVoiceMove func(event *GuildVoiceMove)
OnGuildVoiceLeave func(event *GuildVoiceLeave)
// Guild StageInstance Events
OnStageInstanceCreate func(event *StageInstanceCreate)
OnStageInstanceUpdate func(event *StageInstanceUpdate)
OnStageInstanceDelete func(event *StageInstanceDelete)
// Guild Role Events
OnRoleCreate func(event *RoleCreate)
OnRoleUpdate func(event *RoleUpdate)
OnRoleDelete func(event *RoleDelete)
// Guild Scheduled Events
OnGuildScheduledEventCreate func(event *GuildScheduledEventCreate)
OnGuildScheduledEventUpdate func(event *GuildScheduledEventUpdate)
OnGuildScheduledEventDelete func(event *GuildScheduledEventDelete)
OnGuildScheduledEventUserAdd func(event *GuildScheduledEventUserAdd)
OnGuildScheduledEventUserRemove func(event *GuildScheduledEventUserRemove)
// Interaction Events
OnInteraction func(event *InteractionCreate)
OnApplicationCommandInteraction func(event *ApplicationCommandInteractionCreate)
OnComponentInteraction func(event *ComponentInteractionCreate)
OnAutocompleteInteraction func(event *AutocompleteInteractionCreate)
OnModalSubmit func(event *ModalSubmitInteractionCreate)
// Message Events
OnMessageCreate func(event *MessageCreate)
OnMessageUpdate func(event *MessageUpdate)
OnMessageDelete func(event *MessageDelete)
// Message Poll Events
OnMessagePollVoteAdd func(event *MessagePollVoteAdd)
OnMessagePollVoteRemove func(event *MessagePollVoteRemove)
// DM Message Poll Events
OnDMMessagePollVoteAdd func(event *DMMessagePollVoteAdd)
OnDMMessagePollVoteRemove func(event *DMMessagePollVoteRemove)
// Guild Message Poll Events
OnGuildMessagePollVoteAdd func(event *GuildMessagePollVoteAdd)
OnGuildMessagePollVoteRemove func(event *GuildMessagePollVoteRemove)
// Message Reaction Events
OnMessageReactionAdd func(event *MessageReactionAdd)
OnMessageReactionRemove func(event *MessageReactionRemove)
OnMessageReactionRemoveEmoji func(event *MessageReactionRemoveEmoji)
OnMessageReactionRemoveAll func(event *MessageReactionRemoveAll)
// Self Events
OnSelfUpdate func(event *SelfUpdate)
// User Events
OnUserUpdate func(event *UserUpdate)
OnUserTypingStart func(event *UserTypingStart)
OnGuildMemberTypingStart func(event *GuildMemberTypingStart)
OnDMUserTypingStart func(event *DMUserTypingStart)
OnPresenceUpdate func(event *PresenceUpdate)
// User Activity Events
OnUserActivityStart func(event *UserActivityStart)
OnUserActivityUpdate func(event *UserActivityUpdate)
OnUserActivityStop func(event *UserActivityStop)
OnUserStatusUpdate func(event *UserStatusUpdate)
OnUserClientStatusUpdate func(event *UserClientStatusUpdate)
OnIntegrationCreate func(event *IntegrationCreate)
OnIntegrationUpdate func(event *IntegrationUpdate)
OnIntegrationDelete func(event *IntegrationDelete)
OnGuildIntegrationsUpdate func(event *GuildIntegrationsUpdate)
OnGuildWebhooksUpdate func(event *WebhooksUpdate)
}
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 MessageCreate ¶ added in v0.12.0
type MessageCreate struct {
*GenericMessage
}
MessageCreate indicates that a discord.Message got received
type MessageDelete ¶ added in v0.12.0
type MessageDelete struct {
*GenericMessage
}
MessageDelete indicates that a discord.Message got deleted
type MessagePollVoteAdd ¶ added in v0.18.3
type MessagePollVoteAdd struct {
*GenericMessagePollVote
}
MessagePollVoteAdd indicates that a discord.User voted on a discord.Poll (requires gateway.IntentGuildMessagePolls and/or gateway.IntentDirectMessagePolls)
type MessagePollVoteRemove ¶ added in v0.18.3
type MessagePollVoteRemove struct {
*GenericMessagePollVote
}
MessagePollVoteRemove indicates that a discord.User removed their vote on a discord.Poll (requires gateway.IntentGuildMessagePolls and/or gateway.IntentDirectMessagePolls)
type MessageReactionAdd ¶ added in v0.12.0
type MessageReactionAdd struct {
*GenericReaction
Member *discord.Member
}
MessageReactionAdd indicates that a discord.User added a discord.MessageReaction to a discord.Message in a discord.Channel(this+++ requires the gateway.IntentGuildMessageReactions and/or gateway.IntentDirectMessageReactions)
type MessageReactionRemove ¶ added in v0.12.0
type MessageReactionRemove struct {
*GenericReaction
}
MessageReactionRemove indicates that a discord.User removed a discord.MessageReaction from a discord.Message in a discord.GetChannel(requires the gateway.IntentGuildMessageReactions and/or gateway.IntentDirectMessageReactions)
type MessageReactionRemoveAll ¶ added in v0.12.0
type MessageReactionRemoveAll struct {
*GenericEvent
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID *snowflake.ID
}
MessageReactionRemoveAll indicates someone removed all discord.MessageReaction(s) from a discord.Message in a discord.Channel(requires the gateway.IntentGuildMessageReactions and/or gateway.IntentDirectMessageReactions)
type MessageReactionRemoveEmoji ¶ added in v0.12.0
type MessageReactionRemoveEmoji struct {
*GenericEvent
ChannelID snowflake.ID
MessageID snowflake.ID
GuildID *snowflake.ID
Emoji discord.PartialEmoji
}
MessageReactionRemoveEmoji indicates someone removed all discord.MessageReaction of a specific discord.Emoji from a discord.Message in a discord.Channel(requires the gateway.IntentGuildMessageReactions and/or gateway.IntentDirectMessageReactions)
type MessageUpdate ¶ added in v0.12.0
type MessageUpdate struct {
*GenericMessage
OldMessage discord.Message
}
MessageUpdate indicates that a discord.Message got update
type ModalSubmitInteractionCreate ¶ added in v0.12.0
type ModalSubmitInteractionCreate struct {
*GenericEvent
discord.ModalSubmitInteraction
Respond InteractionResponderFunc
}
ModalSubmitInteractionCreate indicates that a new modal submit interaction has been created.
func (*ModalSubmitInteractionCreate) Acknowledge ¶ added in v0.18.15
func (e *ModalSubmitInteractionCreate) Acknowledge(opts ...rest.RequestOpt) error
Acknowledge acknowledges the interaction.
This is used strictly for acknowledging the HTTP interaction request from discord. This responds with 202 Accepted.
When using this, your first http request must be rest.Interactions.CreateInteractionResponse or rest.Interactions.CreateInteractionResponseWithCallback
This does not produce a visible loading state to the user. You are expected to send a new http request within 3 seconds to respond to the interaction. This allows you to gracefully handle errors with your sent response & access the resulting message.
If you want to create a visible loading state, use DeferCreateMessage.
Source docs: Discord Source docs
func (*ModalSubmitInteractionCreate) CreateMessage ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
CreateMessage responds to the interaction with a new message.
func (*ModalSubmitInteractionCreate) DeferCreateMessage ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
DeferCreateMessage responds to the interaction with a "bot is thinking..." message which should be edited later.
func (*ModalSubmitInteractionCreate) DeferUpdateMessage ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) DeferUpdateMessage(opts ...rest.RequestOpt) error
DeferUpdateMessage responds to the interaction with nothing.
func (*ModalSubmitInteractionCreate) Guild ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) Guild() (discord.Guild, bool)
Guild returns the guild that the interaction happened in if it happened in a guild. If the interaction happened in a DM, it returns nil. This only returns cached guilds.
func (*ModalSubmitInteractionCreate) LaunchActivity ¶ added in v0.18.11
func (e *ModalSubmitInteractionCreate) LaunchActivity(opts ...rest.RequestOpt) error
LaunchActivity responds to the interaction by launching activity associated with the app.
func (*ModalSubmitInteractionCreate) UpdateMessage ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
UpdateMessage responds to the interaction with updating the message the component is from.
type PresenceUpdate ¶ added in v0.16.6
type PresenceUpdate struct {
*GenericEvent
gateway.EventPresenceUpdate
}
type Raw ¶ added in v0.12.0
type Raw struct {
*GenericEvent
gateway.EventRaw
}
type Ready ¶ added in v0.12.0
type Ready struct {
*GenericEvent
gateway.EventReady
}
Ready indicates we received the Ready from the gateway.Gateway
type Resumed ¶ added in v0.12.0
type Resumed struct {
*GenericEvent
}
Resumed indicates disgo resumed the gateway.Gateway
type RoleCreate ¶ added in v0.12.0
type RoleCreate struct {
*GenericRole
}
RoleCreate indicates that a discord.Role got created
type RoleDelete ¶ added in v0.12.0
type RoleDelete struct {
*GenericRole
}
RoleDelete indicates that a discord.Role got deleted
type RoleUpdate ¶ added in v0.12.0
type RoleUpdate struct {
*GenericRole
OldRole discord.Role
}
RoleUpdate indicates that a discord.Role got updated
type SelfUpdate ¶ added in v0.12.0
type SelfUpdate struct {
*GenericEvent
SelfUser discord.OAuth2User
OldSelfUser discord.OAuth2User
}
SelfUpdate is called when something about this discord.User updates
type SoundboardSounds ¶ added in v0.18.13
type SoundboardSounds struct {
*GenericEvent
SoundboardSounds []discord.SoundboardSound
GuildID snowflake.ID
}
SoundboardSounds is a response to gateway.OpcodeRequestSoundboardSounds
type StageInstanceCreate ¶ added in v0.12.0
type StageInstanceCreate struct {
*GenericStageInstance
}
StageInstanceCreate indicates that a StageInstance got created
type StageInstanceDelete ¶ added in v0.12.0
type StageInstanceDelete struct {
*GenericStageInstance
}
StageInstanceDelete indicates that a StageInstance got deleted
type StageInstanceUpdate ¶ added in v0.12.0
type StageInstanceUpdate struct {
*GenericStageInstance
OldStageInstance discord.StageInstance
}
StageInstanceUpdate indicates that a StageInstance got updated
type StickerCreate ¶ added in v0.12.0
type StickerCreate struct {
*GenericSticker
}
StickerCreate indicates that a new discord.Sticker got created in a discord.Guild (requires gateway.IntentGuildExpressions)
type StickerDelete ¶ added in v0.12.0
type StickerDelete struct {
*GenericSticker
}
StickerDelete indicates that a discord.Sticker got deleted in a discord.Guild (requires gateway.IntentGuildExpressions)
type StickerUpdate ¶ added in v0.12.0
type StickerUpdate struct {
*GenericSticker
OldSticker discord.Sticker
}
StickerUpdate indicates that a discord.Sticker got updated in a discord.Guild (requires gateway.IntentGuildExpressions)
type StickersUpdate ¶ added in v0.12.0
type StickersUpdate struct {
*GenericEvent
gateway.EventGuildStickersUpdate
}
StickersUpdate is dispatched when a guild's stickers are updated. This event does not depend on a cache like StickerCreate, StickerUpdate or StickerDelete.
type SubscriptionCreate ¶ added in v0.18.11
type SubscriptionCreate struct {
*GenericSubscriptionEvent
}
type SubscriptionDelete ¶ added in v0.18.11
type SubscriptionDelete struct {
*GenericSubscriptionEvent
}
type SubscriptionUpdate ¶ added in v0.18.11
type SubscriptionUpdate struct {
*GenericSubscriptionEvent
}
type ThreadCreate ¶ added in v0.12.0
type ThreadCreate struct {
*GenericThread
ThreadMember discord.ThreadMember
NewlyCreated bool
}
ThreadCreate is dispatched when a thread is created.
type ThreadDelete ¶ added in v0.12.0
type ThreadDelete struct {
*GenericThread
}
ThreadDelete is dispatched when a thread is deleted.
type ThreadHide ¶ added in v0.12.0
type ThreadHide struct {
*GenericThread
}
ThreadHide is dispatched when your bot loses access to a thread.
type ThreadMemberAdd ¶ added in v0.12.0
type ThreadMemberAdd struct {
*GenericThreadMember
Member discord.Member
Presence *discord.Presence
}
ThreadMemberAdd is dispatched when a user is added to a thread.
type ThreadMemberRemove ¶ added in v0.12.0
type ThreadMemberRemove struct {
*GenericThreadMember
}
ThreadMemberRemove is dispatched when a user is removed from a thread.
type ThreadMemberUpdate ¶ added in v0.12.0
type ThreadMemberUpdate struct {
*GenericThreadMember
OldThreadMember discord.ThreadMember
}
ThreadMemberUpdate is dispatched when a user is updated in a thread.
type ThreadShow ¶ added in v0.12.0
type ThreadShow struct {
*GenericThread
}
ThreadShow is dispatched when your bot gains access to a thread.
type ThreadUpdate ¶ added in v0.12.0
type ThreadUpdate struct {
*GenericThread
OldThread discord.GuildThread
}
ThreadUpdate is dispatched when a thread is updated.
type UserActivityStart ¶ added in v0.12.0
type UserActivityStart struct {
*GenericUserActivity
}
UserActivityStart indicates that a User started an Activity
type UserActivityStop ¶ added in v0.12.0
type UserActivityStop struct {
*GenericUserActivity
}
UserActivityStop indicates that a User stopped an Activity
type UserActivityUpdate ¶ added in v0.12.0
type UserActivityUpdate struct {
*GenericUserActivity
OldActivity discord.Activity
}
UserActivityUpdate indicates that a User updated their Activity
type UserClientStatusUpdate ¶ added in v0.12.0
type UserClientStatusUpdate struct {
*GenericEvent
UserID snowflake.ID
OldClientStatus discord.ClientStatus
ClientStatus discord.ClientStatus
}
UserClientStatusUpdate generic client-specific Status event
type UserStatusUpdate ¶ added in v0.12.0
type UserStatusUpdate struct {
*GenericEvent
UserID snowflake.ID
OldStatus discord.OnlineStatus
Status discord.OnlineStatus
}
UserStatusUpdate generic Status event
type UserTypingStart ¶ added in v0.12.0
type UserTypingStart struct {
*GenericEvent
ChannelID snowflake.ID
GuildID *snowflake.ID
UserID snowflake.ID
Timestamp time.Time
}
UserTypingStart indicates that a discord.User started typing in a discord.DMChannel or discord.MessageChanel(requires the gateway.IntentDirectMessageTyping and/or gateway.IntentGuildMessageTyping)
func (*UserTypingStart) Channel ¶ added in v0.12.0
func (e *UserTypingStart) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.GuildMessageChannel the discord.User started typing in
type UserUpdate ¶ added in v0.12.0
type UserUpdate struct {
*GenericUser
OldUser discord.User
}
UserUpdate indicates that a discord.User updated
type VoiceServerUpdate ¶ added in v0.12.0
type VoiceServerUpdate struct {
*GenericEvent
gateway.EventVoiceServerUpdate
}
VoiceServerUpdate indicates that a voice server the bot is connected to has been changed
type WebhooksUpdate ¶ added in v0.12.0
type WebhooksUpdate struct {
*GenericEvent
GuildId snowflake.ID
ChannelID snowflake.ID
}
WebhooksUpdate indicates that a guilds webhooks were updated.
func (*WebhooksUpdate) Channel ¶ added in v0.12.0
func (e *WebhooksUpdate) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.GuildMessageChannel the webhook was updated in. This will only return cached channels!
Source Files
¶
- dm_channel_events.go
- dm_message_event_events.go
- dm_message_poll_events.go
- dm_message_reaction_events.go
- entitlement_events.go
- gateway_ratelimited_events.go
- gateway_status_events.go
- generic_event.go
- guild_auto_moderation_events.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_poll_events.go
- guild_message_reaction_events.go
- guild_role_events.go
- guild_scheduled_events_events.go
- guild_soundboard_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_ack.go
- interaction_events.go
- listener_adapter.go
- message_events.go
- message_poll_events.go
- message_reaction_events.go
- raw_event.go
- self_update_events.go
- subscription_events.go
- user_activity_events.go
- user_events.go
- user_status_events.go