events

package
v0.12.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 116

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRawEvent

func HandleRawEvent(client bot.Client, gatewayEventType discord.GatewayEventType, sequenceNumber int, shardID int, respondFunc httpserver.RespondFunc, reader io.Reader) io.Reader

HandleRawEvent handles raw events and dispatches the raw event.

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

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

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

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

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 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

Channel returns the discord.MessageChannel that the interaction happened in. This only returns cached channels.

func (*AutocompleteInteractionCreate) DMChannel added in v0.12.0

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

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

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

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

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

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

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

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 discord.GatewayIntentsDirectMessage)

type DMMessageDelete added in v0.12.0

type DMMessageDelete struct {
	*GenericDMMessage
}

DMMessageDelete is called upon deleting a discord.Message in a Channel (requires discord.GatewayIntentsDirectMessage)

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 discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentsDirectMessage)

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 discord.GatewayIntentDirectMessageTyping).

func (DMUserTypingStart) Channel added in v0.12.0

func (e DMUserTypingStart) Channel() (discord.DMChannel, bool)

Channel returns the discord.DMChannel the DMUserTypingStart happened in.

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 discord.GatewayIntentGuildEmojisAndStickers)

type EmojiDelete added in v0.12.0

type EmojiDelete struct {
	*GenericEmoji
}

EmojiDelete indicates that a discord.Emoji got deleted in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)

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 discord.GatewayIntentGuildEmojisAndStickers)

type EmojisUpdate added in v0.12.0

type EmojisUpdate struct {
	*GenericEvent
	discord.GatewayEventGuildEmojisUpdate
}

EmojisUpdate is dispatched when a guild's emojis are updated. This event does not depend on a cache like EmojiCreate, EmojiUpdate or EmojiDelete.

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 discord.GatewayIntentsDirectMessage)

func (GenericDMMessage) Channel added in v0.12.0

func (e GenericDMMessage) Channel() (discord.DMChannel, bool)

Channel returns the Channel the GenericDMMessage happened in

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 discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentGuildEmojisAndStickers)

type GenericEvent

type GenericEvent struct {
	// contains filtered or unexported fields
}

GenericEvent the base event structure

func NewGenericEvent

func NewGenericEvent(client bot.Client, sequenceNumber int, 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

func (GenericGuildChannel) Guild added in v0.12.0

func (e GenericGuildChannel) Guild() (discord.Guild, bool)

Guild returns the discord.Guild the event happened in. This will only check cached guilds!

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

Channel returns the discord.DMChannel where the GenericGuildMessage happened

func (GenericGuildMessage) Guild added in v0.12.0

func (e GenericGuildMessage) Guild() (discord.Guild, bool)

Guild returns the discord.Guild the GenericGuildMessage happened in. This will only check cached guilds!

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

func (*GenericGuildMessageReaction) Member added in v0.12.0

Member returns the Member that reacted to the discord.Message from the cache.

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.

func (*GenericGuildScheduledEventUser) Member added in v0.12.0

Member returns the Member who was added/removed from the GuildScheduledEvent from the cache.

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 discord.GatewayIntentGuildIntegrations)

func (*GenericIntegration) Guild added in v0.12.0

func (e *GenericIntegration) Guild() (discord.Guild, bool)

Guild returns the Guild this Integration was created in. This will only check cached guilds!

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 discord.GatewayIntentGuildInvites)

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

func (*GenericMessage) Guild added in v0.12.0

func (e *GenericMessage) Guild() (discord.Guild, bool)

Guild returns the discord.Guild where the GenericMessage happened or nil if it happened in DMs

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 discord.GatewayIntentGuildEmojisAndStickers)

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

func (*GenericUserActivity) Guild added in v0.12.0

func (g *GenericUserActivity) Guild() (discord.Guild, bool)

Guild returns the Guild that changed their Activity. This will only check cached guilds!

func (*GenericUserActivity) Member added in v0.12.0

func (g *GenericUserActivity) Member() (discord.Member, bool)

Member returns the Member that changed their Activity. This will only check cached members!

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 discord.GatewayIntentGuildMessageTyping)

func (GuildMemberTypingStart) Channel added in v0.12.0

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 discord.GatewayIntentGuildMessageReactions)

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 discord.GatewayIntentGuildMessageReactions)

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 discord.GatewayIntentGuildMessageReactions)

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 discord.GatewayIntentGuildMessageReactions)

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 {
	*GenericGuild
}

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 discord.GatewayIntentsGuildVoiceStates)

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 discord.GatewayIntentsGuildVoiceStates)

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 discord.GatewayIntentsGuildVoiceStates)

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 discord.GatewayIntentsGuildVoiceStates)

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(callbackType discord.InteractionCallbackType, data discord.InteractionCallbackData, 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 discord.GatewayIntentGuildInvites)

type InviteDelete added in v0.12.0

type InviteDelete struct {
	*GenericInvite
}

InviteDelete is called upon deletion of a discord.Invite (requires discord.GatewayIntentGuildInvites)

type ListenerAdapter

type ListenerAdapter struct {
	// raw event
	OnRaw func(event *Raw)

	// GuildApplicationCommandPermissionsUpdate
	OnGuildApplicationCommandPermissionsUpdate func(event *GuildApplicationCommandPermissionsUpdate)

	// 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)
	OnGuildUnavailable func(event *GuildUnavailable)
	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 discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)

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 discord.GatewayIntentGuildMessageReactions and/or discord.GatewayIntentDirectMessageReactions)

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

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

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

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

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
	Type        discord.GatewayEventType
	RawPayload  json.RawMessage
	RespondFunc httpserver.RespondFunc
}

Raw is called for any discord.Gateway Type we receive if enabled in the bot.Config

type Ready added in v0.12.0

type Ready struct {
	*GenericEvent
	discord.GatewayEventReady
}

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 discord.GatewayIntentGuildEmojisAndStickers)

type StickerDelete added in v0.12.0

type StickerDelete struct {
	*GenericSticker
}

StickerDelete indicates that a discord.Sticker got deleted in a discord.Guild (requires discord.GatewayIntentGuildEmojisAndStickers)

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 discord.GatewayIntentGuildEmojisAndStickers)

type StickersUpdate added in v0.12.0

type StickersUpdate struct {
	*GenericEvent
	discord.GatewayEventGuildStickersUpdate
}

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 discord.GatewayIntentDirectMessageTyping and/or discord.GatewayIntentGuildMessageTyping)

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
	discord.VoiceServerUpdate
}

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

Channel returns the Channel the webhook was updated in. This will only return cached channels!

func (*WebhooksUpdate) Guild added in v0.12.0

func (e *WebhooksUpdate) Guild() (discord.Guild, bool)

Guild returns the Guild the webhook was updated in. This will only return cached guilds!

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL