Documentation
¶
Index ¶
- type ApplicationCommandInteractionCreate
- func (e *ApplicationCommandInteractionCreate) Channel() (discord.MessageChannel, bool)
- func (e *ApplicationCommandInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionCreate) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionCreate) DMChannel() (discord.DMChannel, bool)
- func (e *ApplicationCommandInteractionCreate) DeferCreateMessage(ephemeral bool, opts ...rest.RequestOpt) error
- func (e *ApplicationCommandInteractionCreate) Guild() (discord.Guild, bool)
- func (e *ApplicationCommandInteractionCreate) GuildChannel() (discord.GuildMessageChannel, bool)
- type AutoModerationActionExecution
- type AutoModerationRuleCreate
- type AutoModerationRuleDelete
- type AutoModerationRuleUpdate
- type AutocompleteInteractionCreate
- func (e *AutocompleteInteractionCreate) Channel() (discord.MessageChannel, bool)
- func (e *AutocompleteInteractionCreate) DMChannel() (discord.DMChannel, bool)
- func (e *AutocompleteInteractionCreate) Guild() (discord.Guild, bool)
- func (e *AutocompleteInteractionCreate) GuildChannel() (discord.GuildMessageChannel, bool)
- func (e *AutocompleteInteractionCreate) Result(choices []discord.AutocompleteChoice, opts ...rest.RequestOpt) error
- type ComponentInteractionCreate
- func (e *ComponentInteractionCreate) Channel() (discord.MessageChannel, bool)
- func (e *ComponentInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
- func (e *ComponentInteractionCreate) DMChannel() (discord.DMChannel, bool)
- 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) GuildChannel() (discord.GuildMessageChannel, bool)
- func (e *ComponentInteractionCreate) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- type DMChannelCreate
- type DMChannelDelete
- type DMChannelPinsUpdate
- type DMChannelUpdate
- type DMMessageCreate
- type DMMessageDelete
- type DMMessageReactionAdd
- type DMMessageReactionRemove
- type DMMessageReactionRemoveAll
- type DMMessageReactionRemoveEmoji
- type DMMessageUpdate
- type DMUserTypingStart
- type EmojiCreate
- type EmojiDelete
- type EmojiUpdate
- type EmojisUpdate
- type GenericAutoModerationRule
- type GenericDMChannel
- type GenericDMMessage
- type GenericDMMessageReaction
- type GenericEmoji
- type GenericEvent
- type GenericGuild
- type GenericGuildChannel
- type GenericGuildMember
- type GenericGuildMessage
- type GenericGuildMessageReaction
- type GenericGuildScheduledEvent
- type GenericGuildScheduledEventUser
- type GenericGuildVoiceState
- type GenericIntegration
- type GenericInvite
- type GenericMessage
- type GenericReaction
- type GenericRole
- type GenericStageInstance
- type GenericSticker
- type GenericThread
- type GenericThreadMember
- type GenericUser
- type GenericUserActivity
- type GuildApplicationCommandPermissionsUpdate
- 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 GuildMessageReactionAdd
- type GuildMessageReactionRemove
- type GuildMessageReactionRemoveAll
- type GuildMessageReactionRemoveEmoji
- type GuildMessageUpdate
- type GuildReady
- type GuildScheduledEventCreate
- type GuildScheduledEventDelete
- type GuildScheduledEventUpdate
- type GuildScheduledEventUserAdd
- type GuildScheduledEventUserRemove
- type GuildUnavailable
- type GuildUnban
- type GuildUpdate
- type GuildVoiceJoin
- type GuildVoiceLeave
- type GuildVoiceMove
- type GuildVoiceStateUpdate
- type GuildsReady
- type IntegrationCreate
- type IntegrationDelete
- type IntegrationUpdate
- type InteractionCreate
- type InteractionResponderFunc
- type InviteCreate
- type InviteDelete
- type ListenerAdapter
- type MessageCreate
- type MessageDelete
- type MessageReactionAdd
- type MessageReactionRemove
- type MessageReactionRemoveAll
- type MessageReactionRemoveEmoji
- type MessageUpdate
- type ModalSubmitInteractionCreate
- func (e *ModalSubmitInteractionCreate) Channel() (discord.MessageChannel, bool)
- func (e *ModalSubmitInteractionCreate) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (e *ModalSubmitInteractionCreate) DMChannel() (discord.DMChannel, bool)
- 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) GuildChannel() (discord.GuildMessageChannel, bool)
- func (e *ModalSubmitInteractionCreate) UpdateMessage(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- type Raw
- type Ready
- type Resumed
- type RoleCreate
- type RoleDelete
- type RoleUpdate
- type SelfUpdate
- type StageInstanceCreate
- type StageInstanceDelete
- type StageInstanceUpdate
- type StickerCreate
- type StickerDelete
- type StickerUpdate
- type StickersUpdate
- 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) Channel ¶ added in v0.12.0
func (e *ApplicationCommandInteractionCreate) Channel() (discord.MessageChannel, bool)
Channel returns the discord.MessageChannel that the interaction happened in. This only returns cached channels.
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) CreateModal ¶ added in v0.12.0
func (e *ApplicationCommandInteractionCreate) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
CreateModal responds to the interaction with a new modal.
func (*ApplicationCommandInteractionCreate) DMChannel ¶ added in v0.12.0
func (e *ApplicationCommandInteractionCreate) DMChannel() (discord.DMChannel, bool)
DMChannel returns the discord.DMChannel that the interaction happened in. If the interaction happened in a guild, it returns nil. This only returns cached channels.
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) GuildChannel ¶ added in v0.12.0
func (e *ApplicationCommandInteractionCreate) GuildChannel() (discord.GuildMessageChannel, bool)
GuildChannel returns the discord.GuildMessageChannel that the interaction happened in. If the interaction happened in a dm, it returns nil. This only returns cached channels.
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) Channel ¶ added in v0.12.0
func (e *AutocompleteInteractionCreate) Channel() (discord.MessageChannel, bool)
Channel returns the discord.MessageChannel that the interaction happened in. This only returns cached channels.
func (*AutocompleteInteractionCreate) DMChannel ¶ added in v0.12.0
func (e *AutocompleteInteractionCreate) DMChannel() (discord.DMChannel, bool)
DMChannel returns the discord.DMChannel that the interaction happened in. If the interaction happened in a guild, it returns nil. This only returns cached channels.
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.
func (*AutocompleteInteractionCreate) GuildChannel ¶ added in v0.12.0
func (e *AutocompleteInteractionCreate) GuildChannel() (discord.GuildMessageChannel, bool)
GuildChannel returns the discord.GuildMessageChannel that the interaction happened in. If the interaction happened in a dm, it returns nil. This only returns cached channels.
func (*AutocompleteInteractionCreate) Result ¶ added in v0.12.0
func (e *AutocompleteInteractionCreate) Result(choices []discord.AutocompleteChoice, opts ...rest.RequestOpt) error
Result responds to the interaction with a slice of choices.
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) Channel ¶ added in v0.12.0
func (e *ComponentInteractionCreate) Channel() (discord.MessageChannel, bool)
Channel returns the discord.MessageChannel that the interaction happened in. This only returns cached channels.
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) CreateModal ¶ added in v0.12.0
func (e *ComponentInteractionCreate) CreateModal(modalCreate discord.ModalCreate, opts ...rest.RequestOpt) error
CreateModal responds to the interaction with a new modal.
func (*ComponentInteractionCreate) DMChannel ¶ added in v0.12.0
func (e *ComponentInteractionCreate) DMChannel() (discord.DMChannel, bool)
DMChannel returns the discord.DMChannel that the interaction happened in. If the interaction happened in a guild, it returns nil. This only returns cached channels.
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) GuildChannel ¶ added in v0.12.0
func (e *ComponentInteractionCreate) GuildChannel() (discord.GuildMessageChannel, bool)
GuildChannel returns the discord.GuildMessageChannel that the interaction happened in. If the interaction happened in a dm, it returns nil. This only returns cached channels.
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 DMChannelCreate ¶ added in v0.12.0
type DMChannelCreate struct {
*GenericDMChannel
}
DMChannelCreate indicates that a new discord.DMChannel got created.
type DMChannelDelete ¶ added in v0.12.0
type DMChannelDelete struct {
*GenericDMChannel
}
DMChannelDelete indicates that a discord.DMChannel got deleted.
type DMChannelPinsUpdate ¶ added in v0.12.0
type DMChannelPinsUpdate struct {
*GenericEvent
ChannelID snowflake.ID
NewLastPinTimestamp *time.Time
OldLastPinTimestamp *time.Time
}
DMChannelPinsUpdate indicates that a discord.Message got pinned or unpinned.
type DMChannelUpdate ¶ added in v0.12.0
type DMChannelUpdate struct {
*GenericDMChannel
OldChannel discord.DMChannel
}
DMChannelUpdate indicates that a discord.DMChannel got updated.
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 DMMessageReactionAdd ¶ added in v0.12.0
type DMMessageReactionAdd struct {
*GenericDMMessageReaction
}
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.ReactionEmoji
}
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.IntentGuildEmojisAndStickers)
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.IntentGuildEmojisAndStickers)
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.IntentGuildEmojisAndStickers)
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 GenericAutoModerationRule ¶ added in v0.12.7
type GenericAutoModerationRule struct {
*GenericEvent
discord.AutoModerationRule
}
type GenericDMChannel ¶ added in v0.12.0
type GenericDMChannel struct {
*GenericEvent
Channel discord.DMChannel
ChannelID snowflake.ID
}
GenericDMChannel is called upon receiving DMChannelCreate , DMChannelUpdate , DMChannelDelete or DMUserTypingStart.
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 GenericDMMessageReaction ¶ added in v0.12.0
type GenericDMMessageReaction struct {
*GenericEvent
UserID snowflake.ID
ChannelID snowflake.ID
MessageID snowflake.ID
Emoji discord.ReactionEmoji
}
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.IntentGuildEmojisAndStickers)
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
Guild discord.Guild
}
GenericGuild is called upon receiving GuildUpdate , GuildAvailable , GuildUnavailable , GuildJoin , GuildLeave , GuildReady , GuildBan , GuildUnban
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.DMChannel where the GenericGuildMessage 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.ReactionEmoji
}
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 GenericGuildVoiceState ¶ added in v0.12.0
type GenericGuildVoiceState struct {
*GenericEvent
VoiceState discord.VoiceState
Member discord.Member
}
GenericGuildVoiceState is called upon receiving GuildVoiceJoin , GuildVoiceMove , 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 GenericInvite ¶ added in v0.12.0
type GenericInvite struct {
*GenericEvent
GuildID *snowflake.ID
ChannelID snowflake.ID
Code string
}
GenericInvite is called upon receiving InviteCreate or InviteDelete (requires gateway.IntentGuildInvites)
func (*GenericInvite) Channel ¶ added in v0.12.0
func (e *GenericInvite) Channel() (discord.GuildChannel, bool)
Channel returns the Channel the GenericInvite happened in.
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.MessageChannel, bool)
Channel returns the discord.Channel where the GenericMessage happened
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.ReactionEmoji
}
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.IntentGuildEmojisAndStickers)
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 GuildAvailable ¶ added in v0.12.0
type GuildAvailable struct {
*GenericGuild
}
GuildAvailable is called when an unavailable discord.Guild becomes available
type GuildBan ¶ added in v0.12.0
type GuildBan struct {
*GenericEvent
GuildID snowflake.ID
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
}
GuildJoin is called when the bot joins a discord.Guild
type GuildLeave ¶ added in v0.12.0
type GuildLeave struct {
*GenericGuild
}
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)
func (*GuildMemberTypingStart) Channel ¶ added in v0.12.0
func (e *GuildMemberTypingStart) Channel() (discord.GuildMessageChannel, bool)
Channel returns the discord.BaseGuildMessageChannel 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 GuildMessageReactionAdd ¶ added in v0.12.0
type GuildMessageReactionAdd struct {
*GenericGuildMessageReaction
Member discord.Member
}
GuildMessageReactionAdd indicates that a discord.Member added a discord.ReactionEmoji 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.ReactionEmoji
}
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
}
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 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 {
*GenericEvent
GuildID snowflake.ID
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
OldGuild discord.Guild
}
GuildUpdate is called upon receiving discord.Guild updates
type GuildVoiceJoin ¶ added in v0.12.0
type GuildVoiceJoin struct {
*GenericGuildVoiceState
}
GuildVoiceJoin indicates that a discord.Member joined a discord.Channel(requires gateway.IntentsGuildVoiceStates)
type GuildVoiceLeave ¶ added in v0.12.0
type GuildVoiceLeave struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
}
GuildVoiceLeave indicates that a discord.Member left a discord.Channel(requires gateway.IntentsGuildVoiceStates)
type GuildVoiceMove ¶ added in v0.12.0
type GuildVoiceMove struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
}
GuildVoiceMove indicates that a discord.Member moved a discord.Channel(requires gateway.IntentsGuildVoiceStates)
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.IntentsGuildVoiceStates)
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 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.
func (*InteractionCreate) Channel ¶ added in v0.12.0
func (e *InteractionCreate) Channel() (discord.MessageChannel, bool)
Channel returns the discord.MessageChannel that the interaction happened in. This only returns cached channels.
func (*InteractionCreate) DMChannel ¶ added in v0.12.0
func (e *InteractionCreate) DMChannel() (discord.DMChannel, bool)
DMChannel returns the discord.DMChannel that the interaction happened in. If the interaction happened in a guild, it returns nil. This only returns cached channels.
func (*InteractionCreate) Guild ¶ added in v0.12.0
func (e *InteractionCreate) 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 (*InteractionCreate) GuildChannel ¶ added in v0.12.0
func (e *InteractionCreate) GuildChannel() (discord.GuildMessageChannel, bool)
GuildChannel returns the discord.GuildMessageChannel that the interaction happened in. If the interaction happened in a dm, it returns nil. This only returns cached channels.
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 {
*GenericInvite
Invite discord.Invite
}
InviteCreate is called upon creation of a new discord.Invite (requires gateway.IntentGuildInvites)
type InviteDelete ¶ added in v0.12.0
type InviteDelete struct {
*GenericInvite
}
InviteDelete is called upon deletion of a discord.Invite (requires gateway.IntentGuildInvites)
type ListenerAdapter ¶
type ListenerAdapter struct {
// raw event
OnRaw func(event *Raw)
// 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
OnDMChannelCreate func(event *DMChannelCreate)
OnDMChannelUpdate func(event *DMChannelUpdate)
OnDMChannelDelete func(event *DMChannelDelete)
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)
// 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)
// 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 Voice Events
OnVoiceServerUpdate func(event *VoiceServerUpdate)
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 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)
// 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 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.ReactionEmoji
}
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) Channel ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) Channel() (discord.MessageChannel, bool)
Channel returns the discord.MessageChannel that the interaction happened in. This only returns cached channels.
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) DMChannel ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) DMChannel() (discord.DMChannel, bool)
DMChannel returns the discord.DMChannel that the interaction happened in. If the interaction happened in a guild, it returns nil. This only returns cached channels.
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) GuildChannel ¶ added in v0.12.0
func (e *ModalSubmitInteractionCreate) GuildChannel() (discord.GuildMessageChannel, bool)
GuildChannel returns the discord.GuildMessageChannel that the interaction happened in. If the interaction happened in a dm, it returns nil. This only returns cached channels.
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 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 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.IntentGuildEmojisAndStickers)
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.IntentGuildEmojisAndStickers)
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.IntentGuildEmojisAndStickers)
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 ThreadCreate ¶ added in v0.12.0
type ThreadCreate struct {
*GenericThread
ThreadMember discord.ThreadMember
}
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.MessageChannel, bool)
Channel returns the discord.MessageChannel 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 Channel the webhook was updated in. This will only return cached channels!
Source Files
¶
- dm_channel_events.go
- dm_message_event_events.go
- dm_message_reaction_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_reaction_events.go
- guild_role_events.go
- guild_scheduled_events_events.go
- guild_stage_instance_events.go
- guild_sticker_events.go
- guild_thread_events.go
- guild_voice_events.go
- guild_webhooks_update_events.go
- interaction_events.go
- listener_adapter.go
- message_events.go
- message_reaction_events.go
- raw_event.go
- self_update_events.go
- user_activity_events.go
- user_events.go
- user_status_events.go