Documentation
¶
Index ¶
- Variables
- func GetMemberPermissions(member *Member) discord.Permissions
- func GetMemberPermissionsInChannel(channel GuildChannel, member *Member) discord.Permissions
- func LastPinTimestamp(channel MessageChannel) *discord.Time
- func NewCompetingPresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
- func NewGamePresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
- func NewListeningPresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
- func NewPresence(activityType discord.ActivityType, name string, url string, ...) discord.UpdatePresenceCommandData
- func NewStreamingPresence(name string, url string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
- func NewWatchingPresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
- type ApplicationCommand
- type ApplicationCommandInteraction
- type ApplicationCommandInteractionFilter
- type ApplicationCommandPermissions
- type ApplicationWebhook
- type AudioController
- type AuditLog
- type AuditLogFilterOptions
- type AutocompleteInteraction
- func (i *AutocompleteInteraction) Channel() Channel
- func (i *AutocompleteInteraction) CommandPath() string
- func (i *AutocompleteInteraction) Guild() *Guild
- func (i *AutocompleteInteraction) Respond(callbackType discord.InteractionCallbackType, ...) error
- func (i *AutocompleteInteraction) Result(choices []discord.AutocompleteChoice, opts ...rest.RequestOpt) error
- func (i *AutocompleteInteraction) ResultMapFloat(resultMap map[string]float64, opts ...rest.RequestOpt) error
- func (i *AutocompleteInteraction) ResultMapInt(resultMap map[string]int, opts ...rest.RequestOpt) error
- func (i *AutocompleteInteraction) ResultMapString(resultMap map[string]string, opts ...rest.RequestOpt) error
- type AutocompleteInteractionData
- type AutocompleteInteractionFilter
- type AutocompleteOptionsMap
- func (m AutocompleteOptionsMap) Bool(name string) *bool
- func (m AutocompleteOptionsMap) BoolOption(name string) *discord.AutocompleteOptionBool
- func (m AutocompleteOptionsMap) ChannelOption(name string) *discord.AutocompleteOptionChannel
- func (m AutocompleteOptionsMap) Find(optionFindFunc func(option discord.AutocompleteOption) bool) discord.AutocompleteOption
- func (m AutocompleteOptionsMap) FindAll(optionFindFunc func(option discord.AutocompleteOption) bool) []discord.AutocompleteOption
- func (m AutocompleteOptionsMap) Float(name string) *float64
- func (m AutocompleteOptionsMap) FloatOption(name string) *discord.AutocompleteOptionFloat
- func (m AutocompleteOptionsMap) Focused(name string) bool
- func (m AutocompleteOptionsMap) FocusedOption() discord.AutocompleteOption
- func (m AutocompleteOptionsMap) Get(name string) discord.AutocompleteOption
- func (m AutocompleteOptionsMap) GetAll() []discord.AutocompleteOption
- func (m AutocompleteOptionsMap) GetByType(optionType discord.ApplicationCommandOptionType) []discord.AutocompleteOption
- func (m AutocompleteOptionsMap) Int(name string) *int
- func (m AutocompleteOptionsMap) IntOption(name string) *discord.AutocompleteOptionInt
- func (m AutocompleteOptionsMap) MentionableOption(name string) *discord.AutocompleteOptionMentionable
- func (m AutocompleteOptionsMap) RoleOption(name string) *discord.AutocompleteOptionRole
- func (m AutocompleteOptionsMap) Snowflake(name string) *discord.Snowflake
- func (m AutocompleteOptionsMap) String(name string) *string
- func (m AutocompleteOptionsMap) StringOption(name string) *discord.AutocompleteOptionString
- func (m AutocompleteOptionsMap) UserOption(name string) *discord.AutocompleteOptionUser
- type Ban
- type BaseGuildMessageChannel
- type Bot
- func (b *Bot) AddEventListeners(listeners ...EventListener)
- func (b *Bot) Close(ctx context.Context) error
- func (b *Bot) ConnectGateway(ctx context.Context) error
- func (b *Bot) ConnectShardManager(ctx context.Context) error
- func (b *Bot) CreateCommand(commandCreate discord.ApplicationCommandCreate, opts ...rest.RequestOpt) (ApplicationCommand, error)
- func (b *Bot) CreateGuildCommand(guildID discord.Snowflake, commandCreate discord.ApplicationCommandCreate, ...) (ApplicationCommand, error)
- func (b *Bot) CreateGuildFromTemplate(templateCode string, createGuildFromTemplate discord.GuildFromTemplateCreate, ...) (*Guild, error)
- func (b *Bot) DeleteCommand(commandID discord.Snowflake, opts ...rest.RequestOpt) error
- func (b *Bot) DeleteGuildCommand(guildID discord.Snowflake, commandID discord.Snowflake, ...) error
- func (b *Bot) DeleteInvite(inviteCode string, opts ...rest.RequestOpt) (*Invite, error)
- func (b *Bot) EditCommand(commandID discord.Snowflake, commandUpdate discord.ApplicationCommandUpdate, ...) (ApplicationCommand, error)
- func (b *Bot) EditGuildCommand(guildID discord.Snowflake, commandID discord.Snowflake, ...) (ApplicationCommand, error)
- func (b *Bot) GetCommand(commandID discord.Snowflake, opts ...rest.RequestOpt) (ApplicationCommand, error)
- func (b *Bot) GetCommands(opts ...rest.RequestOpt) ([]ApplicationCommand, error)
- func (b *Bot) GetGuildCommand(guildID discord.Snowflake, commandID discord.Snowflake, ...) (ApplicationCommand, error)
- func (b *Bot) GetGuildCommandPermissions(guildID discord.Snowflake, commandID discord.Snowflake, ...) (*ApplicationCommandPermissions, error)
- func (b *Bot) GetGuildCommands(guildID discord.Snowflake, opts ...rest.RequestOpt) ([]ApplicationCommand, error)
- func (b *Bot) GetGuildCommandsPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) ([]*ApplicationCommandPermissions, error)
- func (b *Bot) GetInvite(inviteCode string, opts ...rest.RequestOpt) (*Invite, error)
- func (b *Bot) GetNitroStickerPacks(opts ...rest.RequestOpt) ([]*StickerPack, error)
- func (b *Bot) GetSticker(stickerID discord.Snowflake, opts ...rest.RequestOpt) (*Sticker, error)
- func (b *Bot) GetTemplate(code string, opts ...rest.RequestOpt) (*GuildTemplate, error)
- func (b *Bot) HasGateway() bool
- func (b *Bot) HasHTTPServer() bool
- func (b *Bot) HasShardManager() bool
- func (b *Bot) RemoveEventListeners(listeners ...EventListener)
- func (b *Bot) SelfMember(guildID discord.Snowflake) *Member
- func (b *Bot) SetCommands(commandCreates []discord.ApplicationCommandCreate, opts ...rest.RequestOpt) ([]ApplicationCommand, error)
- func (b *Bot) SetGuildCommandPermissions(guildID discord.Snowflake, commandID discord.Snowflake, ...) (*ApplicationCommandPermissions, error)
- func (b *Bot) SetGuildCommands(guildID discord.Snowflake, commandCreates []discord.ApplicationCommandCreate, ...) ([]ApplicationCommand, error)
- func (b *Bot) SetGuildCommandsPermissions(guildID discord.Snowflake, ...) ([]*ApplicationCommandPermissions, error)
- func (b *Bot) SetPresence(ctx context.Context, presenceUpdate discord.UpdatePresenceCommandData) error
- func (b *Bot) SetPresenceForShard(ctx context.Context, shardId int, ...) error
- func (b *Bot) Shard(guildID discord.Snowflake) (gateway.Gateway, error)
- func (b *Bot) StartHTTPServer() error
- type BotIntegration
- type ButtonInteraction
- func (i *ButtonInteraction) ButtonComponent() discord.ButtonComponent
- func (i *ButtonInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (i *ButtonInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (i *ButtonInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
- func (i *ButtonInteraction) DeferUpdate(opts ...rest.RequestOpt) error
- func (i *ButtonInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (i *ButtonInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
- func (i *ButtonInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (i *ButtonInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
- func (i *ButtonInteraction) Respond(callbackType discord.InteractionCallbackType, ...) error
- func (i *ButtonInteraction) Update(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- func (i *ButtonInteraction) UpdateButton(button discord.ButtonComponent, opts ...rest.RequestOpt) error
- func (i *ButtonInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (i *ButtonInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
- type ButtonInteractionFilter
- type CacheConfig
- type CacheConfigOpt
- type CacheFlags
- type CacheStrategy
- type Caches
- type Channel
- type ChannelCache
- type ChannelFindFunc
- type ChannelFollowerWebhook
- type Collectors
- type CollectorsConfig
- type ComponentInteraction
- type ComponentInteractionFilter
- type DMChannel
- func (c *DMChannel) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *DMChannel) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *DMChannel) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (c *DMChannel) Delete(opts ...rest.RequestOpt) error
- func (c *DMChannel) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *DMChannel) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (c *DMChannel) GetMessages(around discord.Snowflake, before discord.Snowflake, after discord.Snowflake, ...) ([]*Message, error)
- func (c *DMChannel) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *DMChannel) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *DMChannel) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *DMChannel) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, ...) error
- func (c *DMChannel) SendTyping(opts ...rest.RequestOpt) error
- func (c *DMChannel) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- type Emoji
- type EmojiCache
- type EmojiFindFunc
- type EntityBuilder
- type Event
- type EventListener
- type EventManager
- type EventManagerConfig
- type GatewayEventHandler
- type GroupDMChannel
- type Guild
- func (g *Guild) AddMember(userID discord.Snowflake, memberAdd discord.MemberAdd, opts ...rest.RequestOpt) (*Member, error)
- func (g *Guild) BanMember(userID discord.Snowflake, deleteMessageDays int, opts ...rest.RequestOpt) error
- func (g *Guild) CreateEmoji(emojiCreate discord.EmojiCreate, opts ...rest.RequestOpt) (*Emoji, error)
- func (g *Guild) CreateGuildCommand(commandCreate discord.ApplicationCommandCreate, opts ...rest.RequestOpt) (ApplicationCommand, error)
- func (g *Guild) CreateGuildScheduledEvent(guildScheduledEventCreate discord.GuildScheduledEventCreate, ...) (*GuildScheduledEvent, error)
- func (g *Guild) CreateRole(roleCreate discord.RoleCreate, opts ...rest.RequestOpt) (*Role, error)
- func (g *Guild) CreateSticker(stickerCreate discord.StickerCreate, opts ...rest.RequestOpt) (*Sticker, error)
- func (g *Guild) CreateTemplate(guildTemplateCreate discord.GuildTemplateCreate, opts ...rest.RequestOpt) (*GuildTemplate, error)
- func (g *Guild) Delete(opts ...rest.RequestOpt) error
- func (g *Guild) DeleteEmoji(emojiID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) DeleteGuildCommand(commandID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) DeleteGuildScheduledEvent(guildScheduledEventID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) DeleteIntegration(integrationID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) DeleteRole(roleID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) DeleteSticker(stickerID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) DeleteTemplate(templateCode string, opts ...rest.RequestOpt) (*GuildTemplate, error)
- func (g *Guild) Disconnect(ctx context.Context) error
- func (g *Guild) GetAuditLogs(filterOptions AuditLogFilterOptions, opts ...rest.RequestOpt) (*AuditLog, error)
- func (g *Guild) GetBan(userID discord.Snowflake, opts ...rest.RequestOpt) (*Ban, error)
- func (g *Guild) GetBans(opts ...rest.RequestOpt) ([]*Ban, error)
- func (g *Guild) GetGuildCommand(commandID discord.Snowflake, opts ...rest.RequestOpt) (ApplicationCommand, error)
- func (g *Guild) GetGuildCommandPermissions(commandID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
- func (g *Guild) GetGuildCommands(opts ...rest.RequestOpt) ([]ApplicationCommand, error)
- func (g *Guild) GetGuildCommandsPermissions(opts ...rest.RequestOpt) ([]*ApplicationCommandPermissions, error)
- func (g *Guild) GetGuildScheduledEventUsers(guildScheduledEventID discord.Snowflake, limit int, withMember bool, ...) ([]*GuildScheduledEventUser, error)
- func (g *Guild) GetIntegrations(opts ...rest.RequestOpt) ([]Integration, error)
- func (g *Guild) GetMember(userID discord.Snowflake) *Member
- func (g *Guild) GetTemplates(opts ...rest.RequestOpt) ([]*GuildTemplate, error)
- func (g *Guild) IconURL(size int) *string
- func (g *Guild) KickMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) Leave(opts ...rest.RequestOpt) error
- func (g *Guild) PublicRole() *Role
- func (g *Guild) RequestMembers(userIDs ...discord.Snowflake) ([]*Member, error)
- func (g *Guild) RequestMembersChan(userIDs []discord.Snowflake) (<-chan *Member, func(), error)
- func (g *Guild) RequestMembersCtx(ctx context.Context, userIDs ...discord.Snowflake) ([]*Member, error)
- func (g *Guild) RequestMembersWithFilter(memberFilterFunc func(member *Member) bool) ([]*Member, error)
- func (g *Guild) RequestMembersWithFilterChan(memberFilterFunc func(member *Member) bool) (<-chan *Member, func(), error)
- func (g *Guild) RequestMembersWithFilterCtx(ctx context.Context, memberFilterFunc func(member *Member) bool) ([]*Member, error)
- func (g *Guild) RequestMembersWithQuery(query string, limit int) ([]*Member, error)
- func (g *Guild) RequestMembersWithQueryChan(query string, limit int) (<-chan *Member, func(), error)
- func (g *Guild) RequestMembersWithQueryCtx(ctx context.Context, query string, limit int) ([]*Member, error)
- func (g *Guild) RoleCache() map[discord.Snowflake]*Role
- func (g *Guild) Roles() []*Role
- func (g *Guild) SelfMember() *Member
- func (g *Guild) SetGuildCommandPermissions(commandID discord.Snowflake, ...) (*ApplicationCommandPermissions, error)
- func (g *Guild) SetGuildCommands(commandCreates []discord.ApplicationCommandCreate, opts ...rest.RequestOpt) ([]ApplicationCommand, error)
- func (g *Guild) SetGuildCommandsPermissions(commandPermissions []discord.ApplicationCommandPermissionsSet, ...) ([]*ApplicationCommandPermissions, error)
- func (g *Guild) SyncTemplate(templateCode string, opts ...rest.RequestOpt) (*GuildTemplate, error)
- func (g *Guild) UnbanMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (g *Guild) Update(updateGuild discord.GuildUpdate, opts ...rest.RequestOpt) (*Guild, error)
- func (g *Guild) UpdateEmoji(emojiID discord.Snowflake, emojiUpdate discord.EmojiUpdate, ...) (*Emoji, error)
- func (g *Guild) UpdateGuildCommand(commandID discord.Snowflake, commandUpdate discord.ApplicationCommandUpdate, ...) (ApplicationCommand, error)
- func (g *Guild) UpdateGuildScheduledEvent(guildScheduledEventID discord.Snowflake, ...) (*GuildScheduledEvent, error)
- func (g *Guild) UpdateMember(userID discord.Snowflake, memberUpdate discord.MemberUpdate, ...) (*Member, error)
- func (g *Guild) UpdateRole(roleID discord.Snowflake, roleUpdate discord.RoleUpdate, ...) (*Role, error)
- func (g *Guild) UpdateSticker(stickerID discord.Snowflake, stickerUpdate discord.StickerUpdate, ...) (*Sticker, error)
- func (g *Guild) UpdateTemplate(templateCode string, guildTemplateUpdate discord.GuildTemplateUpdate, ...) (*GuildTemplate, error)
- type GuildAudioChannel
- type GuildCache
- type GuildCategoryChannel
- func (c *GuildCategoryChannel) Channels() []GuildChannel
- func (c *GuildCategoryChannel) Delete(opts ...rest.RequestOpt) error
- func (c *GuildCategoryChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildCategoryChannel) Guild() *Guild
- func (c *GuildCategoryChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildCategoryChannel) Members() []*Member
- func (c *GuildCategoryChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildCategoryChannel) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildCategoryChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildCategoryChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildCategoryChannel) Update(channelUpdate discord.GuildCategoryChannelUpdate, opts ...rest.RequestOpt) (*GuildCategoryChannel, error)
- func (c *GuildCategoryChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildCategoryChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type GuildChannel
- type GuildFindFunc
- type GuildMessageChannel
- type GuildNewsChannel
- func (c *GuildNewsChannel) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildNewsChannel) CreateThread(theadCreate discord.ThreadCreate, opts ...rest.RequestOpt) (GuildThread, error)
- func (c *GuildNewsChannel) CreateThreadWithMessage(messageID discord.Snowflake, ...) (GuildThread, error)
- func (c *GuildNewsChannel) CreateWebhook(webhookCreate discord.WebhookCreate, opts ...rest.RequestOpt) (Webhook, error)
- func (c *GuildNewsChannel) CrosspostMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildNewsChannel) Delete(opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) DeleteWebhook(webhookID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildNewsChannel) GetMessages(around discord.Snowflake, before discord.Snowflake, after discord.Snowflake, ...) ([]*Message, error)
- func (c *GuildNewsChannel) GetPublicArchivedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]GuildThread, map[discord.Snowflake]*ThreadMember, bool, error)
- func (c *GuildNewsChannel) GetWebhooks(opts ...rest.RequestOpt) ([]Webhook, error)
- func (c *GuildNewsChannel) Guild() *Guild
- func (c *GuildNewsChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildNewsChannel) Members() []*Member
- func (c *GuildNewsChannel) NewsThreads() []*GuildNewsThread
- func (c *GuildNewsChannel) Parent() *GuildCategoryChannel
- func (c *GuildNewsChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildNewsChannel) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildNewsChannel) PrivateThreads() []*GuildPrivateThread
- func (c *GuildNewsChannel) PublicThreads() []*GuildPublicThread
- func (c *GuildNewsChannel) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, ...) error
- func (c *GuildNewsChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildNewsChannel) SendTyping(opts ...rest.RequestOpt) error
- func (c *GuildNewsChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildNewsChannel) Thread(threadID discord.Snowflake) GuildThread
- func (c *GuildNewsChannel) Threads() []GuildThread
- func (c *GuildNewsChannel) Update(channelUpdate discord.GuildNewsChannelUpdate, opts ...rest.RequestOpt) (GuildMessageChannel, error)
- func (c *GuildNewsChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildNewsChannel) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (c *GuildNewsChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type GuildNewsThread
- func (c *GuildNewsThread) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) AddThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildNewsThread) Delete(opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildNewsThread) GetMessages(around discord.Snowflake, before discord.Snowflake, after discord.Snowflake, ...) ([]*Message, error)
- func (c *GuildNewsThread) GetThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) (*ThreadMember, error)
- func (c *GuildNewsThread) GetThreadMembers(opts ...rest.RequestOpt) ([]*ThreadMember, error)
- func (c *GuildNewsThread) Guild() *Guild
- func (c *GuildNewsThread) Join(opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) Leave(opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildNewsThread) Members() []*Member
- func (c *GuildNewsThread) Parent() *GuildNewsChannel
- func (c *GuildNewsThread) ParentMessageChannel() GuildMessageChannel
- func (c *GuildNewsThread) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildNewsThread) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildNewsThread) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) RemoveThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, ...) error
- func (c *GuildNewsThread) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildNewsThread) SelfThreadMember() *ThreadMember
- func (c *GuildNewsThread) SendTyping(opts ...rest.RequestOpt) error
- func (c *GuildNewsThread) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildNewsThread) ThreadMember(userID discord.Snowflake) *ThreadMember
- func (c *GuildNewsThread) ThreadMembers() []*ThreadMember
- func (c *GuildNewsThread) Update(channelUpdate discord.GuildNewsThreadUpdate, opts ...rest.RequestOpt) (*GuildNewsThread, error)
- func (c *GuildNewsThread) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildNewsThread) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (c *GuildNewsThread) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type GuildPrivateThread
- func (c *GuildPrivateThread) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) AddThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildPrivateThread) Delete(opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildPrivateThread) GetMessages(around discord.Snowflake, before discord.Snowflake, after discord.Snowflake, ...) ([]*Message, error)
- func (c *GuildPrivateThread) GetThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) (*ThreadMember, error)
- func (c *GuildPrivateThread) GetThreadMembers(opts ...rest.RequestOpt) ([]*ThreadMember, error)
- func (c *GuildPrivateThread) Guild() *Guild
- func (c *GuildPrivateThread) Join(opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) Leave(opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildPrivateThread) Members() []*Member
- func (c *GuildPrivateThread) Parent() *GuildTextChannel
- func (c *GuildPrivateThread) ParentMessageChannel() GuildMessageChannel
- func (c *GuildPrivateThread) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildPrivateThread) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildPrivateThread) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) RemoveThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, ...) error
- func (c *GuildPrivateThread) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildPrivateThread) SelfThreadMember() *ThreadMember
- func (c *GuildPrivateThread) SendTyping(opts ...rest.RequestOpt) error
- func (c *GuildPrivateThread) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildPrivateThread) ThreadMember(userID discord.Snowflake) *ThreadMember
- func (c *GuildPrivateThread) ThreadMembers() []*ThreadMember
- func (c *GuildPrivateThread) Update(channelUpdate discord.GuildNewsThreadUpdate, opts ...rest.RequestOpt) (*GuildPrivateThread, error)
- func (c *GuildPrivateThread) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildPrivateThread) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (c *GuildPrivateThread) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type GuildPublicThread
- func (c *GuildPublicThread) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) AddThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildPublicThread) Delete(opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildPublicThread) GetMessages(around discord.Snowflake, before discord.Snowflake, after discord.Snowflake, ...) ([]*Message, error)
- func (c *GuildPublicThread) GetThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) (*ThreadMember, error)
- func (c *GuildPublicThread) GetThreadMembers(opts ...rest.RequestOpt) ([]*ThreadMember, error)
- func (c *GuildPublicThread) Guild() *Guild
- func (c *GuildPublicThread) Join(opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) Leave(opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildPublicThread) Members() []*Member
- func (c *GuildPublicThread) Parent() *GuildTextChannel
- func (c *GuildPublicThread) ParentMessageChannel() GuildMessageChannel
- func (c *GuildPublicThread) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildPublicThread) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildPublicThread) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) RemoveThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, ...) error
- func (c *GuildPublicThread) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildPublicThread) SelfThreadMember() *ThreadMember
- func (c *GuildPublicThread) SendTyping(opts ...rest.RequestOpt) error
- func (c *GuildPublicThread) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildPublicThread) ThreadMember(userID discord.Snowflake) *ThreadMember
- func (c *GuildPublicThread) ThreadMembers() []*ThreadMember
- func (c *GuildPublicThread) Update(channelUpdate discord.GuildNewsThreadUpdate, opts ...rest.RequestOpt) (*GuildPublicThread, error)
- func (c *GuildPublicThread) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildPublicThread) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (c *GuildPublicThread) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type GuildScheduledEvent
- func (e *GuildScheduledEvent) AudioChannel() GuildAudioChannel
- func (e *GuildScheduledEvent) Channel() GuildChannel
- func (e *GuildScheduledEvent) Delete(opts ...rest.RequestOpt) error
- func (e *GuildScheduledEvent) GetUsers(limit int, withMember bool, before discord.Snowflake, after discord.Snowflake, ...) ([]*GuildScheduledEventUser, error)
- func (e *GuildScheduledEvent) Guild() *Guild
- func (e *GuildScheduledEvent) StageInstanceEntity() *StageInstance
- func (e *GuildScheduledEvent) Update(guildScheduledEventUpdate discord.GuildScheduledEventUpdate, ...) (*GuildScheduledEvent, error)
- func (e *GuildScheduledEvent) VoiceChannelEntity() *GuildVoiceChannel
- type GuildScheduledEventCache
- type GuildScheduledEventFindFunc
- type GuildScheduledEventUser
- type GuildStageVoiceChannel
- func (c *GuildStageVoiceChannel) Connect(ctx context.Context) error
- func (c *GuildStageVoiceChannel) CreateStageInstance(stageInstanceCreate discord.StageInstanceCreate, opts ...rest.RequestOpt) (*StageInstance, error)
- func (c *GuildStageVoiceChannel) Delete(opts ...rest.RequestOpt) error
- func (c *GuildStageVoiceChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildStageVoiceChannel) DeleteStageInstance(opts ...rest.RequestOpt) error
- func (c *GuildStageVoiceChannel) Guild() *Guild
- func (c *GuildStageVoiceChannel) IsModerator(member *Member) bool
- func (c *GuildStageVoiceChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildStageVoiceChannel) Members() []*Member
- func (c *GuildStageVoiceChannel) Parent() *GuildCategoryChannel
- func (c *GuildStageVoiceChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildStageVoiceChannel) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildStageVoiceChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildStageVoiceChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildStageVoiceChannel) StageInstance() *StageInstance
- func (c *GuildStageVoiceChannel) Update(channelUpdate discord.GuildStageVoiceChannelUpdate, opts ...rest.RequestOpt) (*GuildStageVoiceChannel, error)
- func (c *GuildStageVoiceChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildStageVoiceChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildStageVoiceChannel) UpdateStageInstance(stageInstanceUpdate discord.StageInstanceUpdate, opts ...rest.RequestOpt) (*StageInstance, error)
- type GuildStoreChannel
- func (c *GuildStoreChannel) Delete(opts ...rest.RequestOpt) error
- func (c *GuildStoreChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildStoreChannel) Guild() *Guild
- func (c *GuildStoreChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildStoreChannel) Members() []*Member
- func (c *GuildStoreChannel) Parent() *GuildCategoryChannel
- func (c *GuildStoreChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildStoreChannel) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildStoreChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildStoreChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildStoreChannel) Update(channelUpdate discord.GuildStoreChannelUpdate, opts ...rest.RequestOpt) (*GuildStoreChannel, error)
- func (c *GuildStoreChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildStoreChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type GuildTemplate
- func (t *GuildTemplate) CreateGuild(createGuildFromTemplate discord.GuildFromTemplateCreate, ...) (*Guild, error)
- func (t *GuildTemplate) Delete(opts ...rest.RequestOpt) (*GuildTemplate, error)
- func (t *GuildTemplate) Guild() *Guild
- func (t *GuildTemplate) Sync(opts ...rest.RequestOpt) (*GuildTemplate, error)
- func (t *GuildTemplate) Update(guildTemplateUpdate discord.GuildTemplateUpdate, opts ...rest.RequestOpt) (*GuildTemplate, error)
- type GuildTextChannel
- func (c *GuildTextChannel) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildTextChannel) CreateThread(theadCreate discord.ThreadCreate, opts ...rest.RequestOpt) (GuildThread, error)
- func (c *GuildTextChannel) CreateThreadWithMessage(messageID discord.Snowflake, ...) (GuildThread, error)
- func (c *GuildTextChannel) CreateWebhook(webhookCreate discord.WebhookCreate, opts ...rest.RequestOpt) (Webhook, error)
- func (c *GuildTextChannel) Delete(opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) DeleteWebhook(webhookID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) GetJoinedPrivateAchievedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]*GuildPrivateThread, map[discord.Snowflake]*ThreadMember, bool, error)
- func (c *GuildTextChannel) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (c *GuildTextChannel) GetMessages(around discord.Snowflake, before discord.Snowflake, after discord.Snowflake, ...) ([]*Message, error)
- func (c *GuildTextChannel) GetPrivateArchivedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]*GuildPrivateThread, map[discord.Snowflake]*ThreadMember, bool, error)
- func (c *GuildTextChannel) GetPublicArchivedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]GuildThread, map[discord.Snowflake]*ThreadMember, bool, error)
- func (c *GuildTextChannel) GetWebhooks(opts ...rest.RequestOpt) ([]Webhook, error)
- func (c *GuildTextChannel) Guild() *Guild
- func (c *GuildTextChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildTextChannel) Members() []*Member
- func (c *GuildTextChannel) Parent() *GuildCategoryChannel
- func (c *GuildTextChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildTextChannel) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildTextChannel) PrivateThreads() []*GuildPrivateThread
- func (c *GuildTextChannel) PublicThreads() []*GuildPublicThread
- func (c *GuildTextChannel) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, ...) error
- func (c *GuildTextChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildTextChannel) SendTyping(opts ...rest.RequestOpt) error
- func (c *GuildTextChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildTextChannel) Thread(threadID discord.Snowflake) GuildThread
- func (c *GuildTextChannel) Threads() []GuildThread
- func (c *GuildTextChannel) Update(channelUpdate discord.GuildTextChannelUpdate, opts ...rest.RequestOpt) (GuildMessageChannel, error)
- func (c *GuildTextChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildTextChannel) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (c *GuildTextChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type GuildThread
- type GuildVoiceChannel
- func (c *GuildVoiceChannel) Connect(ctx context.Context) error
- func (c *GuildVoiceChannel) Delete(opts ...rest.RequestOpt) error
- func (c *GuildVoiceChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
- func (c *GuildVoiceChannel) Guild() *Guild
- func (c *GuildVoiceChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
- func (c *GuildVoiceChannel) Members() []*Member
- func (c *GuildVoiceChannel) Parent() *GuildCategoryChannel
- func (c *GuildVoiceChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
- func (c *GuildVoiceChannel) PermissionOverwrites() []discord.PermissionOverwrite
- func (c *GuildVoiceChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
- func (c *GuildVoiceChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- func (c *GuildVoiceChannel) Update(channelUpdate discord.GuildVoiceChannelUpdate, opts ...rest.RequestOpt) (*GuildVoiceChannel, error)
- func (c *GuildVoiceChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
- func (c *GuildVoiceChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, ...) error
- type HTTPServerEventHandler
- type IncomingWebhook
- func (h *IncomingWebhook) Delete(opts ...rest.RequestOpt) error
- func (h *IncomingWebhook) NewWebhookClient(opts ...webhook.ConfigOpt) *webhook.Client
- func (h *IncomingWebhook) URL() string
- func (h *IncomingWebhook) Update(webhookUpdate discord.WebhookUpdate, opts ...rest.RequestOpt) (*IncomingWebhook, error)
- type Integration
- type IntegrationApplication
- type Interaction
- type InteractionFields
- type InteractionFilter
- type Invite
- type Member
- func (m *Member) AddRole(roleID discord.Snowflake, opts ...rest.RequestOpt) error
- func (m *Member) AvatarURL(size int) *string
- func (m *Member) Ban(deleteMessageDays int, opts ...rest.RequestOpt) error
- func (m *Member) ChannelPermissions(channel GuildChannel) discord.Permissions
- func (m *Member) EffectiveAvatarURL(size int) string
- func (m *Member) Guild() *Guild
- func (m *Member) InteractionPermissions() discord.Permissions
- func (m *Member) IsOwner() bool
- func (m *Member) Kick(opts ...rest.RequestOpt) error
- func (m *Member) Move(channelID discord.Snowflake, opts ...rest.RequestOpt) (*Member, error)
- func (m *Member) Permissions() discord.Permissions
- func (m *Member) RemoveRole(roleID discord.Snowflake, opts ...rest.RequestOpt) error
- func (m *Member) Roles() []*Role
- func (m *Member) Unban(opts ...rest.RequestOpt) error
- func (m *Member) Update(updateGuildMember discord.MemberUpdate, opts ...rest.RequestOpt) (*Member, error)
- func (m *Member) VoiceState() *VoiceState
- type MemberCache
- type MemberCachePolicy
- type MemberChunkingFilter
- type MemberChunkingManager
- type MemberFindFunc
- type Mentionable
- type Message
- func (m *Message) ActionRows() []discord.ActionRowComponent
- func (m *Message) AddReaction(emoji string, opts ...rest.RequestOpt) error
- func (m *Message) AddReactionByEmote(emote Emoji, opts ...rest.RequestOpt) error
- func (m *Message) ButtonByID(customID discord.CustomID) *discord.ButtonComponent
- func (m *Message) Buttons() []discord.ButtonComponent
- func (m *Message) Channel() MessageChannel
- func (m *Message) ComponentByID(customID discord.CustomID) discord.InteractiveComponent
- func (m *Message) CreateThread(threadCreateWithMessage discord.ThreadCreateWithMessage, ...) (GuildThread, error)
- func (m *Message) Crosspost(opts ...rest.RequestOpt) (*Message, error)
- func (m *Message) Delete(opts ...rest.RequestOpt) error
- func (m *Message) Guild() *Guild
- func (m *Message) InteractiveComponents() []discord.InteractiveComponent
- func (m *Message) IsEphemeral() bool
- func (m *Message) IsWebhookMessage() bool
- func (m *Message) Reply(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (m *Message) SelectMenuByID(customID discord.CustomID) *discord.SelectMenuComponent
- func (m *Message) SelectMenus() []discord.SelectMenuComponent
- func (m *Message) Update(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
- type MessageCache
- type MessageCachePolicy
- type MessageChannel
- type MessageCommand
- func (c *MessageCommand) Delete(opts ...rest.RequestOpt) error
- func (c *MessageCommand) GetPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
- func (c *MessageCommand) Guild() *Guild
- func (c *MessageCommand) IsGlobal() bool
- func (c *MessageCommand) SetPermissions(guildID discord.Snowflake, ...) (*ApplicationCommandPermissions, error)
- func (c *MessageCommand) ToCreate() discord.MessageCommandCreate
- func (c *MessageCommand) Update(commandUpdate discord.MessageCommandUpdate, opts ...rest.RequestOpt) (*MessageCommand, error)
- type MessageCommandInteraction
- func (i *MessageCommandInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (i *MessageCommandInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (i *MessageCommandInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
- func (i *MessageCommandInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (i *MessageCommandInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
- func (i *MessageCommandInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (i *MessageCommandInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
- func (i *MessageCommandInteraction) Respond(callbackType discord.InteractionCallbackType, ...) error
- func (i *MessageCommandInteraction) TargetMessage() *Message
- func (i *MessageCommandInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (i *MessageCommandInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
- type MessageCommandInteractionData
- type MessageCommandInteractionFilter
- type MessageCommandResolved
- type MessageFilter
- type MessageFindFunc
- type MessageReactionAdd
- type MessageReactionAddFilter
- type MessageReactionRemove
- type MessageReactionRemoveFilter
- type MessageSticker
- type Presence
- type PresenceCache
- type PresenceFindFunc
- type Role
- func (r *Role) Delete(opts ...rest.RequestOpt) error
- func (r *Role) Guild() *Guild
- func (r *Role) IconURL(size int) *string
- func (r *Role) SetPosition(rolePositionUpdate discord.RolePositionUpdate, opts ...rest.RequestOpt) ([]*Role, error)
- func (r *Role) Update(roleUpdate discord.RoleUpdate, opts ...rest.RequestOpt) (*Role, error)
- type RoleCache
- type RoleFindFunc
- type SelectMenuInteraction
- func (i *SelectMenuInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (i *SelectMenuInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (i *SelectMenuInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
- func (i *SelectMenuInteraction) DeferUpdate(opts ...rest.RequestOpt) error
- func (i *SelectMenuInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (i *SelectMenuInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
- func (i *SelectMenuInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (i *SelectMenuInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
- func (i *SelectMenuInteraction) Respond(callbackType discord.InteractionCallbackType, ...) error
- func (i *SelectMenuInteraction) SelectMenuComponent() discord.SelectMenuComponent
- func (i *SelectMenuInteraction) SelectedOptions() []discord.SelectMenuOption
- func (i *SelectMenuInteraction) Update(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
- func (i *SelectMenuInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (i *SelectMenuInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
- func (i *SelectMenuInteraction) UpdateSelectMenu(selectMenu discord.SelectMenuComponent, opts ...rest.RequestOpt) error
- type SelectMenuInteractionFilter
- type SelfUser
- type SlashCommand
- func (c *SlashCommand) Delete(opts ...rest.RequestOpt) error
- func (c *SlashCommand) GetPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
- func (c *SlashCommand) Guild() *Guild
- func (c *SlashCommand) IsGlobal() bool
- func (c *SlashCommand) SetPermissions(guildID discord.Snowflake, ...) (*ApplicationCommandPermissions, error)
- func (c *SlashCommand) ToCreate() discord.SlashCommandCreate
- func (c *SlashCommand) Update(commandUpdate discord.SlashCommandUpdate, opts ...rest.RequestOpt) (*SlashCommand, error)
- type SlashCommandInteraction
- func (i *SlashCommandInteraction) Channel() Channel
- func (i *SlashCommandInteraction) CommandPath() string
- func (i *SlashCommandInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (i *SlashCommandInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (i *SlashCommandInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
- func (i *SlashCommandInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (i *SlashCommandInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
- func (i *SlashCommandInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (i *SlashCommandInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
- func (i *SlashCommandInteraction) Guild() *Guild
- func (i *SlashCommandInteraction) Respond(callbackType discord.InteractionCallbackType, ...) error
- func (i *SlashCommandInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (i *SlashCommandInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
- type SlashCommandInteractionData
- type SlashCommandInteractionFilter
- type SlashCommandOption
- type SlashCommandOptionBool
- type SlashCommandOptionChannel
- type SlashCommandOptionFloat
- type SlashCommandOptionInt
- type SlashCommandOptionMentionable
- type SlashCommandOptionRole
- type SlashCommandOptionString
- type SlashCommandOptionSubCommand
- type SlashCommandOptionSubCommandGroup
- type SlashCommandOptionUser
- type SlashCommandOptionsMap
- func (m SlashCommandOptionsMap) Bool(name string) *bool
- func (m SlashCommandOptionsMap) BoolOption(name string) *SlashCommandOptionBool
- func (m SlashCommandOptionsMap) Channel(name string) Channel
- func (m SlashCommandOptionsMap) ChannelOption(name string) *SlashCommandOptionChannel
- func (m SlashCommandOptionsMap) Find(optionFindFunc func(option SlashCommandOption) bool) SlashCommandOption
- func (m SlashCommandOptionsMap) FindAll(optionFindFunc func(option SlashCommandOption) bool) []SlashCommandOption
- func (m SlashCommandOptionsMap) Float(name string) *float64
- func (m SlashCommandOptionsMap) FloatOption(name string) *SlashCommandOptionFloat
- func (m SlashCommandOptionsMap) Get(name string) SlashCommandOption
- func (m SlashCommandOptionsMap) GetAll() []SlashCommandOption
- func (m SlashCommandOptionsMap) GetByType(optionType discord.ApplicationCommandOptionType) []SlashCommandOption
- func (m SlashCommandOptionsMap) Int(name string) *int
- func (m SlashCommandOptionsMap) IntOption(name string) *SlashCommandOptionInt
- func (m SlashCommandOptionsMap) Member(name string) *Member
- func (m SlashCommandOptionsMap) MentionableOption(name string) *SlashCommandOptionMentionable
- func (m SlashCommandOptionsMap) Role(name string) *Role
- func (m SlashCommandOptionsMap) RoleOption(name string) *SlashCommandOptionRole
- func (m SlashCommandOptionsMap) Snowflake(name string) *discord.Snowflake
- func (m SlashCommandOptionsMap) String(name string) *string
- func (m SlashCommandOptionsMap) StringOption(name string) *SlashCommandOptionString
- func (m SlashCommandOptionsMap) User(name string) *User
- func (m SlashCommandOptionsMap) UserOption(name string) *SlashCommandOptionUser
- type SlashCommandResolved
- type StageInstance
- func (i *StageInstance) Channel() *GuildStageVoiceChannel
- func (i *StageInstance) Delete(opts ...rest.RequestOpt) error
- func (i *StageInstance) GetListeners() []*Member
- func (i *StageInstance) GetSpeakers() []*Member
- func (i *StageInstance) Guild() *Guild
- func (i *StageInstance) Update(stageInstanceUpdate discord.StageInstanceUpdate, opts ...rest.RequestOpt) (*StageInstance, error)
- type StageInstanceCache
- type StageInstanceFindFunc
- type Sticker
- type StickerCache
- type StickerFindFunc
- type StickerPack
- type ThreadMember
- type ThreadMemberCache
- type ThreadMemberFindFunc
- type TwitchIntegration
- type User
- type UserCache
- type UserCommand
- func (c *UserCommand) Delete(opts ...rest.RequestOpt) error
- func (c *UserCommand) GetPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
- func (c *UserCommand) Guild() *Guild
- func (c *UserCommand) IsGlobal() bool
- func (c *UserCommand) SetPermissions(guildID discord.Snowflake, ...) (*ApplicationCommandPermissions, error)
- func (c *UserCommand) ToCreate() discord.UserCommandCreate
- func (c *UserCommand) Update(commandUpdate discord.UserCommandUpdate, opts ...rest.RequestOpt) (*UserCommand, error)
- type UserCommandInteraction
- func (i *UserCommandInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
- func (i *UserCommandInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
- func (i *UserCommandInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
- func (i *UserCommandInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
- func (i *UserCommandInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
- func (i *UserCommandInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
- func (i *UserCommandInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
- func (i *UserCommandInteraction) Respond(callbackType discord.InteractionCallbackType, ...) error
- func (i *UserCommandInteraction) TargetMember() *Member
- func (i *UserCommandInteraction) TargetUser() *User
- func (i *UserCommandInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, ...) (*Message, error)
- func (i *UserCommandInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
- type UserCommandInteractionData
- type UserCommandInteractionFilter
- type UserCommandResolved
- type UserFindFunc
- type VoiceState
- func (s *VoiceState) Channel() Channel
- func (s *VoiceState) Deaf() bool
- func (s *VoiceState) Guild() *Guild
- func (s *VoiceState) Mute() bool
- func (s *VoiceState) Update(suppress *bool, requestToSpeak *discord.NullTime, opts ...rest.RequestOpt) error
- func (s *VoiceState) UpdateVoiceState(suppress *bool, requestToSpeak *discord.NullTime, opts ...rest.RequestOpt) error
- type VoiceStateCache
- type VoiceStateFindFunc
- type Webhook
- type YouTubeIntegration
Constants ¶
This section is empty.
Variables ¶
var DefaultCacheConfig = CacheConfig{ CacheFlags: CacheFlagsDefault, MemberCachePolicy: MemberCachePolicyDefault, MessageCachePolicy: MessageCachePolicyDefault, }
var (
DefaultEventManagerConfig = EventManagerConfig{}
)
Functions ¶
func GetMemberPermissions ¶
func GetMemberPermissions(member *Member) discord.Permissions
GetMemberPermissions returns all Permissions from the provided Member
func GetMemberPermissionsInChannel ¶
func GetMemberPermissionsInChannel(channel GuildChannel, member *Member) discord.Permissions
func LastPinTimestamp ¶
func LastPinTimestamp(channel MessageChannel) *discord.Time
func NewCompetingPresence ¶
func NewCompetingPresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
NewCompetingPresence creates a new Presence of type discord.ActivityTypeCompeting
func NewGamePresence ¶
func NewGamePresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
NewGamePresence creates a new Presence of type discord.ActivityTypeGame
func NewListeningPresence ¶
func NewListeningPresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
NewListeningPresence creates a new Presence of type discord.ActivityTypeListening
func NewPresence ¶
func NewPresence(activityType discord.ActivityType, name string, url string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
NewPresence creates a new Presence with the provided properties
func NewStreamingPresence ¶
func NewStreamingPresence(name string, url string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
NewStreamingPresence creates a new Presence of type discord.ActivityTypeStreaming
func NewWatchingPresence ¶
func NewWatchingPresence(name string, status discord.OnlineStatus, afk bool) discord.UpdatePresenceCommandData
NewWatchingPresence creates a new Presence of type discord.ActivityTypeWatching
Types ¶
type ApplicationCommand ¶
type ApplicationCommand interface {
discord.ApplicationCommand
}
type ApplicationCommandInteraction ¶
type ApplicationCommandInteraction interface {
discord.ApplicationCommandInteraction
}
ApplicationCommandInteraction represents a generic ApplicationCommand Interaction received from discord
type ApplicationCommandInteractionFilter ¶
type ApplicationCommandInteractionFilter func(interaction Interaction) bool
type ApplicationCommandPermissions ¶
type ApplicationCommandPermissions struct {
discord.ApplicationCommandPermissions
Bot *Bot
}
type ApplicationWebhook ¶
type ApplicationWebhook struct {
discord.ApplicationWebhook
Bot *Bot
}
type AudioController ¶
type AudioController interface {
// Bot returns the core.Bot instance
Bot() *Bot
// Connect sends a discord.GatewayCommand to connect to the specified Channel
Connect(ctx context.Context, guildID discord.Snowflake, channelID discord.Snowflake) error
// Disconnect sends a discord.GatewayCommand to disconnect from a Channel
Disconnect(ctx context.Context, guildID discord.Snowflake) error
}
AudioController lets you Connect / Disconnect from a Channel
func NewAudioController ¶
func NewAudioController(bot *Bot) AudioController
type AuditLog ¶
type AuditLog struct {
discord.AuditLog
GuildScheduledEvents map[discord.Snowflake]*GuildScheduledEvent
Integrations map[discord.Snowflake]Integration
Threads map[discord.Snowflake]GuildThread
Users map[discord.Snowflake]*User
Webhooks map[discord.Snowflake]Webhook
GuildID discord.Snowflake
FilterOptions AuditLogFilterOptions
Bot *Bot
}
type AuditLogFilterOptions ¶
type AuditLogFilterOptions struct {
UserID discord.Snowflake
ActionType discord.AuditLogEvent
Before discord.Snowflake
Limit int
}
AuditLogFilterOptions fields used to filter audit-log retrieving
type AutocompleteInteraction ¶
type AutocompleteInteraction struct {
discord.AutocompleteInteraction
*InteractionFields
Data AutocompleteInteractionData
}
func (*AutocompleteInteraction) Channel ¶
func (i *AutocompleteInteraction) Channel() Channel
Channel returns the Channel from the Caches
func (*AutocompleteInteraction) CommandPath ¶
func (i *AutocompleteInteraction) CommandPath() string
CommandPath returns the ApplicationCommand path
func (*AutocompleteInteraction) Guild ¶
func (i *AutocompleteInteraction) Guild() *Guild
Guild returns the Guild from the Caches
func (*AutocompleteInteraction) Respond ¶
func (i *AutocompleteInteraction) Respond(callbackType discord.InteractionCallbackType, callbackData discord.InteractionCallbackData, opts ...rest.RequestOpt) error
func (*AutocompleteInteraction) Result ¶
func (i *AutocompleteInteraction) Result(choices []discord.AutocompleteChoice, opts ...rest.RequestOpt) error
func (*AutocompleteInteraction) ResultMapFloat ¶
func (i *AutocompleteInteraction) ResultMapFloat(resultMap map[string]float64, opts ...rest.RequestOpt) error
func (*AutocompleteInteraction) ResultMapInt ¶
func (i *AutocompleteInteraction) ResultMapInt(resultMap map[string]int, opts ...rest.RequestOpt) error
func (*AutocompleteInteraction) ResultMapString ¶
func (i *AutocompleteInteraction) ResultMapString(resultMap map[string]string, opts ...rest.RequestOpt) error
type AutocompleteInteractionData ¶
type AutocompleteInteractionData struct {
discord.AutocompleteInteractionData
SubCommandName *string
SubCommandGroupName *string
Options AutocompleteOptionsMap
}
type AutocompleteInteractionFilter ¶
type AutocompleteInteractionFilter func(autocompleteInteraction *AutocompleteInteraction) bool
type AutocompleteOptionsMap ¶
type AutocompleteOptionsMap map[string]discord.AutocompleteOption
func (AutocompleteOptionsMap) Bool ¶
func (m AutocompleteOptionsMap) Bool(name string) *bool
func (AutocompleteOptionsMap) BoolOption ¶
func (m AutocompleteOptionsMap) BoolOption(name string) *discord.AutocompleteOptionBool
func (AutocompleteOptionsMap) ChannelOption ¶
func (m AutocompleteOptionsMap) ChannelOption(name string) *discord.AutocompleteOptionChannel
func (AutocompleteOptionsMap) Find ¶
func (m AutocompleteOptionsMap) Find(optionFindFunc func(option discord.AutocompleteOption) bool) discord.AutocompleteOption
func (AutocompleteOptionsMap) FindAll ¶
func (m AutocompleteOptionsMap) FindAll(optionFindFunc func(option discord.AutocompleteOption) bool) []discord.AutocompleteOption
func (AutocompleteOptionsMap) Float ¶
func (m AutocompleteOptionsMap) Float(name string) *float64
func (AutocompleteOptionsMap) FloatOption ¶
func (m AutocompleteOptionsMap) FloatOption(name string) *discord.AutocompleteOptionFloat
func (AutocompleteOptionsMap) Focused ¶
func (m AutocompleteOptionsMap) Focused(name string) bool
func (AutocompleteOptionsMap) FocusedOption ¶
func (m AutocompleteOptionsMap) FocusedOption() discord.AutocompleteOption
func (AutocompleteOptionsMap) Get ¶
func (m AutocompleteOptionsMap) Get(name string) discord.AutocompleteOption
func (AutocompleteOptionsMap) GetAll ¶
func (m AutocompleteOptionsMap) GetAll() []discord.AutocompleteOption
func (AutocompleteOptionsMap) GetByType ¶
func (m AutocompleteOptionsMap) GetByType(optionType discord.ApplicationCommandOptionType) []discord.AutocompleteOption
func (AutocompleteOptionsMap) Int ¶
func (m AutocompleteOptionsMap) Int(name string) *int
func (AutocompleteOptionsMap) IntOption ¶
func (m AutocompleteOptionsMap) IntOption(name string) *discord.AutocompleteOptionInt
func (AutocompleteOptionsMap) MentionableOption ¶
func (m AutocompleteOptionsMap) MentionableOption(name string) *discord.AutocompleteOptionMentionable
func (AutocompleteOptionsMap) RoleOption ¶
func (m AutocompleteOptionsMap) RoleOption(name string) *discord.AutocompleteOptionRole
func (AutocompleteOptionsMap) Snowflake ¶
func (m AutocompleteOptionsMap) Snowflake(name string) *discord.Snowflake
func (AutocompleteOptionsMap) String ¶
func (m AutocompleteOptionsMap) String(name string) *string
func (AutocompleteOptionsMap) StringOption ¶
func (m AutocompleteOptionsMap) StringOption(name string) *discord.AutocompleteOptionString
func (AutocompleteOptionsMap) UserOption ¶
func (m AutocompleteOptionsMap) UserOption(name string) *discord.AutocompleteOptionUser
type Ban ¶
Ban represents a banned User from a Guild (https://discord.com/developers/docs/resources/guild#ban-object)
type BaseGuildMessageChannel ¶
type BaseGuildMessageChannel interface {
discord.BaseGuildMessageChannel
GuildChannel
MessageChannel
}
type Bot ¶
type Bot struct {
Token string
ApplicationID discord.Snowflake
ClientID discord.Snowflake
SelfUser *SelfUser
Logger log.Logger
RestServices rest.Services
EventManager EventManager
Collectors Collectors
ShardManager sharding.ShardManager
Gateway gateway.Gateway
HTTPServer httpserver.Server
Caches Caches
EntityBuilder EntityBuilder
AudioController AudioController
MemberChunkingManager MemberChunkingManager
}
Bot is the main discord client
func (*Bot) AddEventListeners ¶
func (b *Bot) AddEventListeners(listeners ...EventListener)
AddEventListeners adds one or more EventListener(s) to the EventManager
func (*Bot) ConnectGateway ¶
ConnectGateway opens the gateway connection to discord
func (*Bot) ConnectShardManager ¶
ConnectShardManager opens the gateway connection to discord
func (*Bot) CreateCommand ¶
func (b *Bot) CreateCommand(commandCreate discord.ApplicationCommandCreate, opts ...rest.RequestOpt) (ApplicationCommand, error)
CreateCommand creates a new global discord.ApplicationCommand
func (*Bot) CreateGuildCommand ¶
func (b *Bot) CreateGuildCommand(guildID discord.Snowflake, commandCreate discord.ApplicationCommandCreate, opts ...rest.RequestOpt) (ApplicationCommand, error)
CreateGuildCommand creates a new Guild discord.ApplicationCommand
func (*Bot) CreateGuildFromTemplate ¶
func (b *Bot) CreateGuildFromTemplate(templateCode string, createGuildFromTemplate discord.GuildFromTemplateCreate, opts ...rest.RequestOpt) (*Guild, error)
CreateGuildFromTemplate creates a core.Guild using a core.GuildTemplate code
func (*Bot) DeleteCommand ¶
DeleteCommand creates a new global discord.ApplicationCommand
func (*Bot) DeleteGuildCommand ¶
func (b *Bot) DeleteGuildCommand(guildID discord.Snowflake, commandID discord.Snowflake, opts ...rest.RequestOpt) error
DeleteGuildCommand creates a new Guild discord.ApplicationCommand
func (*Bot) DeleteInvite ¶
func (*Bot) EditCommand ¶
func (b *Bot) EditCommand(commandID discord.Snowflake, commandUpdate discord.ApplicationCommandUpdate, opts ...rest.RequestOpt) (ApplicationCommand, error)
EditCommand edits a specific global discord.ApplicationCommand
func (*Bot) EditGuildCommand ¶
func (b *Bot) EditGuildCommand(guildID discord.Snowflake, commandID discord.Snowflake, commandUpdate discord.ApplicationCommandUpdate, opts ...rest.RequestOpt) (ApplicationCommand, error)
EditGuildCommand edits a specific Guild discord.ApplicationCommand
func (*Bot) GetCommand ¶
func (b *Bot) GetCommand(commandID discord.Snowflake, opts ...rest.RequestOpt) (ApplicationCommand, error)
GetCommand fetches a specific global discord.ApplicationCommand
func (*Bot) GetCommands ¶
func (b *Bot) GetCommands(opts ...rest.RequestOpt) ([]ApplicationCommand, error)
GetCommands fetches all global discord.ApplicationCommand(s)
func (*Bot) GetGuildCommand ¶
func (b *Bot) GetGuildCommand(guildID discord.Snowflake, commandID discord.Snowflake, opts ...rest.RequestOpt) (ApplicationCommand, error)
GetGuildCommand fetches a specific Guild discord.ApplicationCommand
func (*Bot) GetGuildCommandPermissions ¶
func (b *Bot) GetGuildCommandPermissions(guildID discord.Snowflake, commandID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
GetGuildCommandPermissions returns the core.ApplicationCommandPermissions for a specific discord.ApplicationCommand in a core.Guild
func (*Bot) GetGuildCommands ¶
func (b *Bot) GetGuildCommands(guildID discord.Snowflake, opts ...rest.RequestOpt) ([]ApplicationCommand, error)
GetGuildCommands fetches all Guild discord.ApplicationCommand(s)
func (*Bot) GetGuildCommandsPermissions ¶
func (b *Bot) GetGuildCommandsPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) ([]*ApplicationCommandPermissions, error)
GetGuildCommandsPermissions returns the core.ApplicationCommandPermissions for an all discord.ApplicationCommand(s) in an core.Guild
func (*Bot) GetNitroStickerPacks ¶
func (b *Bot) GetNitroStickerPacks(opts ...rest.RequestOpt) ([]*StickerPack, error)
func (*Bot) GetSticker ¶
func (*Bot) GetTemplate ¶
func (b *Bot) GetTemplate(code string, opts ...rest.RequestOpt) (*GuildTemplate, error)
GetTemplate gets a core.GuildTemplate by its code
func (*Bot) HasGateway ¶
HasGateway returns whether this Bot has an active gateway.Gateway connection
func (*Bot) HasHTTPServer ¶
HasHTTPServer returns whether Bot has an active httpserver.Server
func (*Bot) HasShardManager ¶
HasShardManager returns whether this Bot is sharded
func (*Bot) RemoveEventListeners ¶
func (b *Bot) RemoveEventListeners(listeners ...EventListener)
RemoveEventListeners removes one or more EventListener(s) from the EventManager
func (*Bot) SelfMember ¶
SelfMember returns a core.OAuth2User for the client, if available
func (*Bot) SetCommands ¶
func (b *Bot) SetCommands(commandCreates []discord.ApplicationCommandCreate, opts ...rest.RequestOpt) ([]ApplicationCommand, error)
SetCommands overrides all global discord.ApplicationCommand(s)
func (*Bot) SetGuildCommandPermissions ¶
func (b *Bot) SetGuildCommandPermissions(guildID discord.Snowflake, commandID discord.Snowflake, permissions []discord.ApplicationCommandPermission, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
SetGuildCommandPermissions sets the core.ApplicationCommandPermissions for a specific discord.ApplicationCommand
func (*Bot) SetGuildCommands ¶
func (b *Bot) SetGuildCommands(guildID discord.Snowflake, commandCreates []discord.ApplicationCommandCreate, opts ...rest.RequestOpt) ([]ApplicationCommand, error)
SetGuildCommands overrides all Guild discord.ApplicationCommand(s)
func (*Bot) SetGuildCommandsPermissions ¶
func (b *Bot) SetGuildCommandsPermissions(guildID discord.Snowflake, commandPermissions []discord.ApplicationCommandPermissionsSet, opts ...rest.RequestOpt) ([]*ApplicationCommandPermissions, error)
SetGuildCommandsPermissions sets the discord.ApplicationCommandPermissions for all discord.ApplicationCommand(s)
func (*Bot) SetPresence ¶
func (*Bot) SetPresenceForShard ¶
func (b *Bot) SetPresenceForShard(ctx context.Context, shardId int, presenceUpdate discord.UpdatePresenceCommandData) error
SetPresenceForShard sets the Presence of this Bot for the provided shard
func (*Bot) StartHTTPServer ¶
StartHTTPServer starts the interaction webhook server
type BotIntegration ¶
type BotIntegration struct {
discord.BotIntegration
Bot *Bot
GuildID discord.Snowflake
Application *IntegrationApplication
}
func (*BotIntegration) Delete ¶
func (i *BotIntegration) Delete(opts ...rest.RequestOpt) error
Delete deletes the Integration from the Guild
func (*BotIntegration) Guild ¶
func (i *BotIntegration) Guild() *Guild
Guild returns the Guild the Integration belongs to
type ButtonInteraction ¶
type ButtonInteraction struct {
discord.ButtonInteraction
*InteractionFields
Message *Message
}
func (*ButtonInteraction) ButtonComponent ¶
func (i *ButtonInteraction) ButtonComponent() discord.ButtonComponent
ButtonComponent returns the ButtonComponent which issued this ButtonInteraction
func (*ButtonInteraction) Create ¶
func (i *ButtonInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*ButtonInteraction) CreateFollowup ¶
func (i *ButtonInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*ButtonInteraction) DeferCreate ¶
func (i *ButtonInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
func (*ButtonInteraction) DeferUpdate ¶
func (i *ButtonInteraction) DeferUpdate(opts ...rest.RequestOpt) error
func (*ButtonInteraction) DeleteFollowup ¶
func (i *ButtonInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*ButtonInteraction) DeleteOriginal ¶
func (i *ButtonInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
func (*ButtonInteraction) GetFollowup ¶
func (i *ButtonInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*ButtonInteraction) GetOriginal ¶
func (i *ButtonInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
func (*ButtonInteraction) Respond ¶
func (i *ButtonInteraction) Respond(callbackType discord.InteractionCallbackType, callbackData discord.InteractionCallbackData, opts ...rest.RequestOpt) error
func (*ButtonInteraction) Update ¶
func (i *ButtonInteraction) Update(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
func (*ButtonInteraction) UpdateButton ¶
func (i *ButtonInteraction) UpdateButton(button discord.ButtonComponent, opts ...rest.RequestOpt) error
UpdateButton updates the clicked ButtonComponent with a new ButtonComponent
func (*ButtonInteraction) UpdateFollowup ¶
func (i *ButtonInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*ButtonInteraction) UpdateOriginal ¶
func (i *ButtonInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
type ButtonInteractionFilter ¶
type ButtonInteractionFilter func(buttonInteraction *ButtonInteraction) bool
ButtonInteractionFilter used to filter ButtonInteraction(s) in a collectors.ButtonClickCollector
type CacheConfig ¶
type CacheConfig struct {
CacheFlags CacheFlags
MemberCachePolicy MemberCachePolicy
MessageCachePolicy MessageCachePolicy
}
func (*CacheConfig) Apply ¶
func (c *CacheConfig) Apply(opts []CacheConfigOpt)
type CacheConfigOpt ¶
type CacheConfigOpt func(config *CacheConfig)
func WithCacheFlags ¶
func WithCacheFlags(cacheFlags ...CacheFlags) CacheConfigOpt
func WithMemberCachePolicy ¶
func WithMemberCachePolicy(memberCachePolicy MemberCachePolicy) CacheConfigOpt
func WithMessageCachePolicy ¶
func WithMessageCachePolicy(messageCachePolicy MessageCachePolicy) CacheConfigOpt
type CacheFlags ¶
type CacheFlags int
CacheFlags are used to enable/disable certain internal caches
const ( CacheFlagGuilds CacheFlags = 1 << iota CacheFlagGuildScheduledEvents CacheFlagPresences CacheFlagGuildTextChannels CacheFlagDMChannels CacheFlagGuildVoiceChannels CacheFlagGroupDMChannels CacheFlagGuildCategories CacheFlagGuildNewsChannels CacheFlagGuildStoreChannels CacheFlagGuildNewsThreads CacheFlagGuildPublicThreads CacheFlagGuildPrivateThreads CacheFlagGuildStageVoiceChannels CacheFlagRoles CacheFlagRoleTags CacheFlagEmojis CacheFlagStickers CacheFlagVoiceStates CacheFlagStageInstances CacheFlagsNone CacheFlags = 0 CacheFlagsAllChannels = CacheFlagGuildTextChannels | CacheFlagDMChannels | CacheFlagGuildVoiceChannels | CacheFlagGroupDMChannels | CacheFlagGuildCategories | CacheFlagGuildNewsChannels | CacheFlagGuildStoreChannels | CacheFlagGuildNewsThreads | CacheFlagGuildPublicThreads | CacheFlagGuildPrivateThreads | CacheFlagGuildStageVoiceChannels CacheFlagsAllThreads = CacheFlagGuildNewsThreads | CacheFlagGuildPublicThreads | CacheFlagGuildPrivateThreads CacheFlagsDefault = CacheFlagGuilds | CacheFlagsAllChannels | CacheFlagRoles | CacheFlagEmojis | CacheFlagStickers | CacheFlagVoiceStates CacheFlagsFullRoles = CacheFlagRoles | CacheFlagRoleTags CacheFlagsAll = CacheFlagGuilds | CacheFlagGuildScheduledEvents | CacheFlagsAllChannels | CacheFlagsFullRoles | CacheFlagEmojis | CacheFlagStickers | CacheFlagVoiceStates | CacheFlagStageInstances | CacheFlagPresences )
values for CacheFlags
func (CacheFlags) Add ¶
func (f CacheFlags) Add(bits ...CacheFlags) CacheFlags
Add allows you to add multiple bits together, producing a new bit
func (CacheFlags) Has ¶
func (f CacheFlags) Has(bits ...CacheFlags) bool
Has will ensure that the bit includes all the bits entered
func (CacheFlags) Missing ¶
func (f CacheFlags) Missing(bits ...CacheFlags) bool
Missing will check whether the bit is missing any one of the bits
func (CacheFlags) Remove ¶
func (f CacheFlags) Remove(bits ...CacheFlags) CacheFlags
Remove allows you to subtract multiple bits from the first, producing a new bit
type CacheStrategy ¶
CacheStrategy is used to determine whether something should be cached when making an api request. When using the gateway, you'll receive the event shortly afterwards if you have the correct GatewayIntents.
var ( CacheStrategyYes CacheStrategy = func(bot *Bot) bool { return true } CacheStrategyNo CacheStrategy = func(bot *Bot) bool { return true } CacheStrategyNoWs CacheStrategy = func(bot *Bot) bool { return bot.HasGateway() } )
Default caches strategy choices
type Caches ¶
type Caches interface {
Config() CacheConfig
Users() UserCache
Roles() RoleCache
Members() MemberCache
ThreadMembers() ThreadMemberCache
Presences() PresenceCache
VoiceStates() VoiceStateCache
Messages() MessageCache
Emojis() EmojiCache
Stickers() StickerCache
Guilds() GuildCache
Channels() ChannelCache
StageInstances() StageInstanceCache
GuildScheduledEvents() GuildScheduledEventCache
}
func NewCaches ¶
func NewCaches(config CacheConfig) Caches
type ChannelCache ¶
type ChannelCache interface {
Get(channelID discord.Snowflake) Channel
GetCopy(channelID discord.Snowflake) Channel
Set(channel Channel) Channel
Remove(channelID discord.Snowflake)
Cache() map[discord.Snowflake]Channel
All() []Channel
FindFirst(channelFindFunc ChannelFindFunc) Channel
FindAll(channelFindFunc ChannelFindFunc) []Channel
ForAll(channelFunc func(channel Channel))
}
func NewChannelCache ¶
func NewChannelCache(cacheFlags CacheFlags) ChannelCache
type ChannelFindFunc ¶
type ChannelFollowerWebhook ¶
type ChannelFollowerWebhook struct {
discord.ChannelFollowerWebhook
Bot *Bot
User *User
}
func (*ChannelFollowerWebhook) Delete ¶
func (h *ChannelFollowerWebhook) Delete(opts ...rest.RequestOpt) error
func (*ChannelFollowerWebhook) Update ¶
func (h *ChannelFollowerWebhook) Update(webhookUpdate discord.WebhookUpdate, opts ...rest.RequestOpt) (*ChannelFollowerWebhook, error)
type Collectors ¶
type Collectors interface {
NewMessageCollector(filter MessageFilter) (<-chan *Message, func())
NewMessageReactionAddCollector(filter MessageReactionAddFilter) (<-chan *MessageReactionAdd, func())
NewMessageReactionRemoveCollector(filter MessageReactionRemoveFilter) (<-chan *MessageReactionRemove, func())
NewInteractionCollector(filter InteractionFilter) (<-chan Interaction, func())
NewApplicationCommandInteractionCollector(filter ApplicationCommandInteractionFilter) (<-chan ApplicationCommandInteraction, func())
NewSlashCommandCollector(filter SlashCommandInteractionFilter) (<-chan *SlashCommandInteraction, func())
NewMessageCommandCollector(filter MessageCommandInteractionFilter) (<-chan *MessageCommandInteraction, func())
NewUserCommandCollector(filter UserCommandInteractionFilter) (<-chan *UserCommandInteraction, func())
NewComponentInteractionCollector(filter ComponentInteractionFilter) (<-chan ComponentInteraction, func())
NewButtonClickCollector(filter ButtonInteractionFilter) (<-chan *ButtonInteraction, func())
NewSelectMenuSubmitCollector(filter SelectMenuInteractionFilter) (<-chan *SelectMenuInteraction, func())
NewAutocompleteCollector(filter AutocompleteInteractionFilter) (<-chan *AutocompleteInteraction, func())
}
func NewCollectors ¶
func NewCollectors(bot *Bot, config CollectorsConfig) Collectors
type CollectorsConfig ¶
type CollectorsConfig struct {
NewMessageCollectorFunc func(bot *Bot, filter MessageFilter) (<-chan *Message, func())
NewMessageReactionAddCollectorFunc func(bot *Bot, filter MessageReactionAddFilter) (<-chan *MessageReactionAdd, func())
NewMessageReactionRemoveCollectorFunc func(bot *Bot, filter MessageReactionRemoveFilter) (<-chan *MessageReactionRemove, func())
NewInteractionCollectorFunc func(bot *Bot, filter InteractionFilter) (<-chan Interaction, func())
NewApplicationCommandInteractionCollectorFunc func(bot *Bot, filter ApplicationCommandInteractionFilter) (<-chan ApplicationCommandInteraction, func())
NewSlashCommandCollectorFunc func(bot *Bot, filter SlashCommandInteractionFilter) (<-chan *SlashCommandInteraction, func())
NewMessageCommandCollectorFunc func(bot *Bot, filter MessageCommandInteractionFilter) (<-chan *MessageCommandInteraction, func())
NewUserCommandCollectorFunc func(bot *Bot, filter UserCommandInteractionFilter) (<-chan *UserCommandInteraction, func())
NewComponentInteractionCollectorFunc func(bot *Bot, filter ComponentInteractionFilter) (<-chan ComponentInteraction, func())
NewButtonClickCollectorFunc func(bot *Bot, filter ButtonInteractionFilter) (<-chan *ButtonInteraction, func())
NewSelectMenuSubmitCollectorFunc func(bot *Bot, filter SelectMenuInteractionFilter) (<-chan *SelectMenuInteraction, func())
NewAutocompleteCollectorFunc func(bot *Bot, filter AutocompleteInteractionFilter) (<-chan *AutocompleteInteraction, func())
}
type ComponentInteraction ¶
type ComponentInteraction interface {
discord.ComponentInteraction
}
ComponentInteraction represents a generic discord.Component Interaction received from discord
type ComponentInteractionFilter ¶
type ComponentInteractionFilter func(interaction Interaction) bool
type DMChannel ¶
func (*DMChannel) AddReaction ¶
func (*DMChannel) BulkDeleteMessages ¶
func (*DMChannel) CreateMessage ¶
func (c *DMChannel) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*DMChannel) DeleteMessage ¶
func (*DMChannel) GetMessage ¶
func (*DMChannel) GetMessages ¶
func (*DMChannel) RemoveAllReactions ¶
func (*DMChannel) RemoveAllReactionsForEmoji ¶
func (*DMChannel) RemoveOwnReaction ¶
func (*DMChannel) RemoveUserReaction ¶
func (*DMChannel) SendTyping ¶
func (c *DMChannel) SendTyping(opts ...rest.RequestOpt) error
func (*DMChannel) UpdateMessage ¶
func (c *DMChannel) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
type Emoji ¶
func (*Emoji) Reaction ¶
Reaction returns the identifier used for adding and removing reactions for messages in discord
func (*Emoji) Update ¶
func (e *Emoji) Update(emojiUpdate discord.EmojiUpdate, opts ...rest.RequestOpt) (*Emoji, error)
type EmojiCache ¶
type EmojiCache interface {
Get(guildID discord.Snowflake, emojiID discord.Snowflake) *Emoji
GetCopy(guildID discord.Snowflake, emojiID discord.Snowflake) *Emoji
Set(emoji *Emoji) *Emoji
Remove(guildID discord.Snowflake, emojiID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*Emoji
All() map[discord.Snowflake][]*Emoji
GuildCache(guildID discord.Snowflake) map[discord.Snowflake]*Emoji
GuildAll(guildID discord.Snowflake) []*Emoji
FindFirst(emojiFindFunc EmojiFindFunc) *Emoji
FindAll(emojiFindFunc EmojiFindFunc) []*Emoji
}
func NewEmojiCache ¶
func NewEmojiCache(cacheFlags CacheFlags) EmojiCache
type EmojiFindFunc ¶
type EntityBuilder ¶
type EntityBuilder interface {
Bot() *Bot
CreateInteraction(interaction discord.Interaction, responseChannel chan<- discord.InteractionResponse, updateCache CacheStrategy) Interaction
CreateUser(user discord.User, updateCache CacheStrategy) *User
CreateSelfUser(selfUser discord.OAuth2User, updateCache CacheStrategy) *SelfUser
CreatePresence(presence discord.Presence, updateCache CacheStrategy) *Presence
CreateMessage(message discord.Message, updateCache CacheStrategy) *Message
CreateGuild(guild discord.Guild, updateCache CacheStrategy) *Guild
CreateGuildTemplate(guildTemplate discord.GuildTemplate, updateCache CacheStrategy) *GuildTemplate
CreateStageInstance(stageInstance discord.StageInstance, updateCache CacheStrategy) *StageInstance
CreateGuildScheduledEvent(guildScheduledEvent discord.GuildScheduledEvent, updateCache CacheStrategy) *GuildScheduledEvent
CreateGuildScheduledEventUser(guildID discord.Snowflake, guildScheduledEventUser discord.GuildScheduledEventUser, updateCache CacheStrategy) *GuildScheduledEventUser
CreateRole(guildID discord.Snowflake, role discord.Role, updateCache CacheStrategy) *Role
CreateMember(guildID discord.Snowflake, member discord.Member, updateCache CacheStrategy) *Member
CreateBan(guildID discord.Snowflake, ban discord.Ban, updateCache CacheStrategy) *Ban
CreateVoiceState(voiceState discord.VoiceState, updateCache CacheStrategy) *VoiceState
CreateApplicationCommand(applicationCommand discord.ApplicationCommand) ApplicationCommand
CreateApplicationCommandPermissions(guildCommandPermissions discord.ApplicationCommandPermissions) *ApplicationCommandPermissions
CreateAuditLog(guildID discord.Snowflake, auditLog discord.AuditLog, filterOptions AuditLogFilterOptions, updateCache CacheStrategy) *AuditLog
CreateIntegration(guildID discord.Snowflake, integration discord.Integration, updateCache CacheStrategy) Integration
CreateChannel(channel discord.Channel, updateCache CacheStrategy) Channel
CreateThreadMember(threadMember discord.ThreadMember, updateCache CacheStrategy) *ThreadMember
CreateInvite(invite discord.Invite, updateCache CacheStrategy) *Invite
CreateEmoji(guildID discord.Snowflake, emoji discord.Emoji, updateCache CacheStrategy) *Emoji
CreateStickerPack(stickerPack discord.StickerPack, updateCache CacheStrategy) *StickerPack
CreateSticker(sticker discord.Sticker, updateCache CacheStrategy) *Sticker
CreateMessageSticker(sticker discord.MessageSticker) *MessageSticker
CreateWebhook(webhook discord.Webhook, updateCache CacheStrategy) Webhook
}
EntityBuilder is used to create structs for disgo's caches
func NewEntityBuilder ¶
func NewEntityBuilder(bot *Bot) EntityBuilder
type EventListener ¶
type EventListener interface {
OnEvent(event Event)
}
EventListener is used to create new EventListener to listen to events
type EventManager ¶
type EventManager interface {
Bot() *Bot
Config() EventManagerConfig
AddEventListeners(eventListeners ...EventListener)
RemoveEventListeners(eventListeners ...EventListener)
HandleGateway(gatewayEventType discord.GatewayEventType, sequenceNumber int, payload io.Reader)
HandleHTTP(responseChannel chan<- discord.InteractionResponse, payload io.Reader)
Dispatch(event Event)
}
EventManager lets you listen for specific events triggered by raw gateway events
func NewEventManager ¶
func NewEventManager(bot *Bot, config *EventManagerConfig) EventManager
type EventManagerConfig ¶
type EventManagerConfig struct {
EventListeners []EventListener
RawEventsEnabled bool
AsyncEventsEnabled bool
GatewayHandlers map[discord.GatewayEventType]GatewayEventHandler
HTTPServerHandler HTTPServerEventHandler
}
type GatewayEventHandler ¶
type GatewayEventHandler interface {
EventType() discord.GatewayEventType
New() interface{}
HandleGatewayEvent(bot *Bot, sequenceNumber int, v interface{})
}
GatewayEventHandler is used to handle Gateway Event(s)
type GroupDMChannel ¶
type GroupDMChannel struct {
discord.GroupDMChannel
Bot *Bot
RecipientIDs []discord.Snowflake
}
func (*GroupDMChannel) Delete ¶
func (c *GroupDMChannel) Delete(opts ...rest.RequestOpt) error
func (*GroupDMChannel) GetIconURL ¶
func (c *GroupDMChannel) GetIconURL(size int) *string
GetIconURL returns the Icon URL of this channel.
func (*GroupDMChannel) Update ¶
func (c *GroupDMChannel) Update(channelUpdate discord.GroupDMChannelUpdate, opts ...rest.RequestOpt) (*GroupDMChannel, error)
type Guild ¶
func (*Guild) AddMember ¶
func (g *Guild) AddMember(userID discord.Snowflake, memberAdd discord.MemberAdd, opts ...rest.RequestOpt) (*Member, error)
AddMember adds a member to the Guild with the oauth2 access token
func (*Guild) BanMember ¶
func (g *Guild) BanMember(userID discord.Snowflake, deleteMessageDays int, opts ...rest.RequestOpt) error
BanMember bans a Member from the Guild
func (*Guild) CreateEmoji ¶
func (g *Guild) CreateEmoji(emojiCreate discord.EmojiCreate, opts ...rest.RequestOpt) (*Emoji, error)
CreateEmoji creates a new Emoji with the properties provided in discord.EmojiCreate
func (*Guild) CreateGuildCommand ¶
func (g *Guild) CreateGuildCommand(commandCreate discord.ApplicationCommandCreate, opts ...rest.RequestOpt) (ApplicationCommand, error)
CreateGuildCommand creates a new Guild discord.ApplicationCommand
func (*Guild) CreateGuildScheduledEvent ¶ added in v0.6.1
func (g *Guild) CreateGuildScheduledEvent(guildScheduledEventCreate discord.GuildScheduledEventCreate, opts ...rest.RequestOpt) (*GuildScheduledEvent, error)
func (*Guild) CreateRole ¶
func (g *Guild) CreateRole(roleCreate discord.RoleCreate, opts ...rest.RequestOpt) (*Role, error)
CreateRole creates a new Role with the properties provided in discord.RoleCreate
func (*Guild) CreateSticker ¶
func (g *Guild) CreateSticker(stickerCreate discord.StickerCreate, opts ...rest.RequestOpt) (*Sticker, error)
CreateSticker creates a new Sticker with the properties provided in discord.StickerCreate
func (*Guild) CreateTemplate ¶
func (g *Guild) CreateTemplate(guildTemplateCreate discord.GuildTemplateCreate, opts ...rest.RequestOpt) (*GuildTemplate, error)
CreateTemplate creates a new GuildTemplate
func (*Guild) Delete ¶
func (g *Guild) Delete(opts ...rest.RequestOpt) error
Delete deletes the this Guild
func (*Guild) DeleteEmoji ¶
DeleteEmoji deletes an Emoji
func (*Guild) DeleteGuildCommand ¶
DeleteGuildCommand creates a new Guild discord.ApplicationCommand
func (*Guild) DeleteGuildScheduledEvent ¶ added in v0.6.1
func (*Guild) DeleteIntegration ¶
DeleteIntegration deletes a specific Integration from the Guild. Requires PermissionManageServer
func (*Guild) DeleteRole ¶
DeleteRole deletes a Role
func (*Guild) DeleteSticker ¶
DeleteSticker deletes a Sticker
func (*Guild) DeleteTemplate ¶
func (g *Guild) DeleteTemplate(templateCode string, opts ...rest.RequestOpt) (*GuildTemplate, error)
DeleteTemplate deletes a specific GuildTemplate
func (*Guild) Disconnect ¶
Disconnect sends a GatewayCommand to disconnect from this Guild
func (*Guild) GetAuditLogs ¶
func (g *Guild) GetAuditLogs(filterOptions AuditLogFilterOptions, opts ...rest.RequestOpt) (*AuditLog, error)
GetAuditLogs gets AuditLog(s) for this Guild
func (*Guild) GetBans ¶
func (g *Guild) GetBans(opts ...rest.RequestOpt) ([]*Ban, error)
GetBans fetches all bans for this Guild
func (*Guild) GetGuildCommand ¶
func (g *Guild) GetGuildCommand(commandID discord.Snowflake, opts ...rest.RequestOpt) (ApplicationCommand, error)
GetGuildCommand fetches a specific Guild discord.ApplicationCommand
func (*Guild) GetGuildCommandPermissions ¶
func (g *Guild) GetGuildCommandPermissions(commandID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
GetGuildCommandPermissions returns the core.ApplicationCommandPermissions for a specific discord.ApplicationCommand in an core.Guild
func (*Guild) GetGuildCommands ¶
func (g *Guild) GetGuildCommands(opts ...rest.RequestOpt) ([]ApplicationCommand, error)
GetGuildCommands fetches all Guild discord.ApplicationCommand(s)
func (*Guild) GetGuildCommandsPermissions ¶
func (g *Guild) GetGuildCommandsPermissions(opts ...rest.RequestOpt) ([]*ApplicationCommandPermissions, error)
GetGuildCommandsPermissions returns the core.ApplicationCommandPermissions for a all discord.ApplicationCommand(s) in an core.Guild
func (*Guild) GetGuildScheduledEventUsers ¶ added in v0.6.1
func (*Guild) GetIntegrations ¶
func (g *Guild) GetIntegrations(opts ...rest.RequestOpt) ([]Integration, error)
GetIntegrations gets all Integration(s) from the Guild. Requires PermissionManageServer
func (*Guild) GetTemplates ¶
func (g *Guild) GetTemplates(opts ...rest.RequestOpt) ([]*GuildTemplate, error)
GetTemplates gets a specific GuildTemplate
func (*Guild) KickMember ¶
KickMember kicks an existing member from the Guild
func (*Guild) RequestMembers ¶
func (*Guild) RequestMembersChan ¶
func (*Guild) RequestMembersCtx ¶
func (*Guild) RequestMembersWithFilter ¶
func (*Guild) RequestMembersWithFilterChan ¶
func (*Guild) RequestMembersWithFilterCtx ¶
func (*Guild) RequestMembersWithQuery ¶
func (*Guild) RequestMembersWithQueryChan ¶
func (*Guild) RequestMembersWithQueryCtx ¶
func (*Guild) SelfMember ¶
SelfMember returns the Member for the current logged-in User for this Guild
func (*Guild) SetGuildCommandPermissions ¶
func (g *Guild) SetGuildCommandPermissions(commandID discord.Snowflake, permissions []discord.ApplicationCommandPermission, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
SetGuildCommandPermissions sets the core.ApplicationCommandPermissions for a specific discord.ApplicationCommand
func (*Guild) SetGuildCommands ¶
func (g *Guild) SetGuildCommands(commandCreates []discord.ApplicationCommandCreate, opts ...rest.RequestOpt) ([]ApplicationCommand, error)
SetGuildCommands overrides all Guild discord.ApplicationCommand(s)
func (*Guild) SetGuildCommandsPermissions ¶
func (g *Guild) SetGuildCommandsPermissions(commandPermissions []discord.ApplicationCommandPermissionsSet, opts ...rest.RequestOpt) ([]*ApplicationCommandPermissions, error)
SetGuildCommandsPermissions sets the discord.ApplicationCommandPermissions for all discord.ApplicationCommand(s)
func (*Guild) SyncTemplate ¶
func (g *Guild) SyncTemplate(templateCode string, opts ...rest.RequestOpt) (*GuildTemplate, error)
SyncTemplate syncs the current Guild status to an existing GuildTemplate
func (*Guild) UnbanMember ¶
UnbanMember unbans a Member from the Guild
func (*Guild) Update ¶
func (g *Guild) Update(updateGuild discord.GuildUpdate, opts ...rest.RequestOpt) (*Guild, error)
Update updates the this Guild
func (*Guild) UpdateEmoji ¶
func (g *Guild) UpdateEmoji(emojiID discord.Snowflake, emojiUpdate discord.EmojiUpdate, opts ...rest.RequestOpt) (*Emoji, error)
UpdateEmoji creates an Emoji with the properties provided in discord.EmojiUpdate
func (*Guild) UpdateGuildCommand ¶
func (g *Guild) UpdateGuildCommand(commandID discord.Snowflake, commandUpdate discord.ApplicationCommandUpdate, opts ...rest.RequestOpt) (ApplicationCommand, error)
UpdateGuildCommand edits a specific Guild discord.ApplicationCommand
func (*Guild) UpdateGuildScheduledEvent ¶ added in v0.6.1
func (g *Guild) UpdateGuildScheduledEvent(guildScheduledEventID discord.Snowflake, guildScheduledEventUpdate discord.GuildScheduledEventUpdate, opts ...rest.RequestOpt) (*GuildScheduledEvent, error)
func (*Guild) UpdateMember ¶
func (g *Guild) UpdateMember(userID discord.Snowflake, memberUpdate discord.MemberUpdate, opts ...rest.RequestOpt) (*Member, error)
UpdateMember updates an existing member of the Guild
func (*Guild) UpdateRole ¶
func (g *Guild) UpdateRole(roleID discord.Snowflake, roleUpdate discord.RoleUpdate, opts ...rest.RequestOpt) (*Role, error)
UpdateRole updates a Role with the properties provided in discord.RoleUpdate
func (*Guild) UpdateSticker ¶
func (g *Guild) UpdateSticker(stickerID discord.Snowflake, stickerUpdate discord.StickerUpdate, opts ...rest.RequestOpt) (*Sticker, error)
UpdateSticker updates a Sticker with the properties provided in discord.StickerCreate
func (*Guild) UpdateTemplate ¶
func (g *Guild) UpdateTemplate(templateCode string, guildTemplateUpdate discord.GuildTemplateUpdate, opts ...rest.RequestOpt) (*GuildTemplate, error)
UpdateTemplate updates a specific GuildTemplate
type GuildAudioChannel ¶
type GuildAudioChannel interface {
discord.GuildAudioChannel
GuildChannel
Connect(ctx context.Context) error
// contains filtered or unexported methods
}
type GuildCache ¶
type GuildCache interface {
rwsync.RWLocker
Get(guildID discord.Snowflake) *Guild
GetCopy(guildID discord.Snowflake) *Guild
Set(guild *Guild) *Guild
Remove(guildID discord.Snowflake)
Cache() map[discord.Snowflake]*Guild
All() []*Guild
FindFirst(guildFindFunc GuildFindFunc) *Guild
FindAll(guildFindFunc GuildFindFunc) []*Guild
SetReady(shardID int, guildID discord.Snowflake)
SetUnready(shardID int, guildID discord.Snowflake)
IsUnready(shardID int, guildID discord.Snowflake) bool
UnreadyGuilds(shardID int) []discord.Snowflake
SetAvailable(guildID discord.Snowflake)
}
func NewGuildCache ¶
func NewGuildCache(cacheFlags CacheFlags) GuildCache
type GuildCategoryChannel ¶
type GuildCategoryChannel struct {
discord.GuildCategoryChannel
Bot *Bot
}
func (*GuildCategoryChannel) Channels ¶
func (c *GuildCategoryChannel) Channels() []GuildChannel
func (*GuildCategoryChannel) Delete ¶
func (c *GuildCategoryChannel) Delete(opts ...rest.RequestOpt) error
func (*GuildCategoryChannel) DeletePermissionOverwrite ¶
func (c *GuildCategoryChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildCategoryChannel) Guild ¶
func (c *GuildCategoryChannel) Guild() *Guild
func (*GuildCategoryChannel) MemberPermissionOverwrite ¶
func (c *GuildCategoryChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildCategoryChannel) Members ¶
func (c *GuildCategoryChannel) Members() []*Member
func (*GuildCategoryChannel) PermissionOverwrite ¶
func (c *GuildCategoryChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildCategoryChannel) PermissionOverwrites ¶
func (c *GuildCategoryChannel) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildCategoryChannel) RolePermissionOverwrite ¶
func (c *GuildCategoryChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildCategoryChannel) SetPermissionOverwrite ¶
func (c *GuildCategoryChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildCategoryChannel) Update ¶
func (c *GuildCategoryChannel) Update(channelUpdate discord.GuildCategoryChannelUpdate, opts ...rest.RequestOpt) (*GuildCategoryChannel, error)
Update updates the GuildNewsChannel which can return either a GuildNewsChannel or a GuildTextChannel
func (*GuildCategoryChannel) UpdateGuildChannel ¶
func (c *GuildCategoryChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildCategoryChannel) UpdatePermissionOverwrite ¶
func (c *GuildCategoryChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type GuildChannel ¶
type GuildChannel interface {
discord.GuildChannel
Channel
Guild() *Guild
UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
Delete(opts ...rest.RequestOpt) error
PermissionOverwrites() []discord.PermissionOverwrite
PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
Members() []*Member
}
type GuildFindFunc ¶
type GuildMessageChannel ¶
type GuildMessageChannel interface {
discord.GuildMessageChannel
BaseGuildMessageChannel
GetWebhooks(opts ...rest.RequestOpt) ([]Webhook, error)
CreateWebhook(webhookCreate discord.WebhookCreate, opts ...rest.RequestOpt) (Webhook, error)
DeleteWebhook(webhookID discord.Snowflake, opts ...rest.RequestOpt) error
Threads() []GuildThread
Thread(threadID discord.Snowflake) GuildThread
CreateThread(theadCreate discord.ThreadCreate, opts ...rest.RequestOpt) (GuildThread, error)
CreateThreadWithMessage(messageID discord.Snowflake, threadCreateWithMessage discord.ThreadCreateWithMessage, opts ...rest.RequestOpt) (GuildThread, error)
GetPublicArchivedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]GuildThread, map[discord.Snowflake]*ThreadMember, bool, error)
}
type GuildNewsChannel ¶
type GuildNewsChannel struct {
discord.GuildNewsChannel
Bot *Bot
}
func (*GuildNewsChannel) AddReaction ¶
func (c *GuildNewsChannel) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) BulkDeleteMessages ¶
func (c *GuildNewsChannel) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) CreateMessage ¶
func (c *GuildNewsChannel) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildNewsChannel) CreateThread ¶
func (c *GuildNewsChannel) CreateThread(theadCreate discord.ThreadCreate, opts ...rest.RequestOpt) (GuildThread, error)
func (*GuildNewsChannel) CreateThreadWithMessage ¶
func (c *GuildNewsChannel) CreateThreadWithMessage(messageID discord.Snowflake, threadCreateWithMessage discord.ThreadCreateWithMessage, opts ...rest.RequestOpt) (GuildThread, error)
func (*GuildNewsChannel) CreateWebhook ¶
func (c *GuildNewsChannel) CreateWebhook(webhookCreate discord.WebhookCreate, opts ...rest.RequestOpt) (Webhook, error)
func (*GuildNewsChannel) CrosspostMessage ¶
func (c *GuildNewsChannel) CrosspostMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*GuildNewsChannel) Delete ¶
func (c *GuildNewsChannel) Delete(opts ...rest.RequestOpt) error
func (*GuildNewsChannel) DeleteMessage ¶
func (c *GuildNewsChannel) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) DeletePermissionOverwrite ¶
func (c *GuildNewsChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) DeleteWebhook ¶
func (c *GuildNewsChannel) DeleteWebhook(webhookID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) GetMessage ¶
func (c *GuildNewsChannel) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*GuildNewsChannel) GetMessages ¶
func (*GuildNewsChannel) GetPublicArchivedThreads ¶
func (c *GuildNewsChannel) GetPublicArchivedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]GuildThread, map[discord.Snowflake]*ThreadMember, bool, error)
func (*GuildNewsChannel) GetWebhooks ¶
func (c *GuildNewsChannel) GetWebhooks(opts ...rest.RequestOpt) ([]Webhook, error)
func (*GuildNewsChannel) Guild ¶
func (c *GuildNewsChannel) Guild() *Guild
func (*GuildNewsChannel) MemberPermissionOverwrite ¶
func (c *GuildNewsChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildNewsChannel) Members ¶
func (c *GuildNewsChannel) Members() []*Member
func (*GuildNewsChannel) NewsThreads ¶
func (c *GuildNewsChannel) NewsThreads() []*GuildNewsThread
func (*GuildNewsChannel) Parent ¶
func (c *GuildNewsChannel) Parent() *GuildCategoryChannel
func (*GuildNewsChannel) PermissionOverwrite ¶
func (c *GuildNewsChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildNewsChannel) PermissionOverwrites ¶
func (c *GuildNewsChannel) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildNewsChannel) PrivateThreads ¶
func (c *GuildNewsChannel) PrivateThreads() []*GuildPrivateThread
func (*GuildNewsChannel) PublicThreads ¶
func (c *GuildNewsChannel) PublicThreads() []*GuildPublicThread
func (*GuildNewsChannel) RemoveAllReactions ¶
func (c *GuildNewsChannel) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) RemoveAllReactionsForEmoji ¶
func (c *GuildNewsChannel) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) RemoveOwnReaction ¶
func (c *GuildNewsChannel) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) RemoveUserReaction ¶
func (c *GuildNewsChannel) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) RolePermissionOverwrite ¶
func (c *GuildNewsChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildNewsChannel) SendTyping ¶
func (c *GuildNewsChannel) SendTyping(opts ...rest.RequestOpt) error
func (*GuildNewsChannel) SetPermissionOverwrite ¶
func (c *GuildNewsChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildNewsChannel) Thread ¶
func (c *GuildNewsChannel) Thread(threadID discord.Snowflake) GuildThread
func (*GuildNewsChannel) Threads ¶
func (c *GuildNewsChannel) Threads() []GuildThread
func (*GuildNewsChannel) Update ¶
func (c *GuildNewsChannel) Update(channelUpdate discord.GuildNewsChannelUpdate, opts ...rest.RequestOpt) (GuildMessageChannel, error)
Update updates the GuildNewsChannel which can return either a GuildNewsChannel or a GuildTextChannel
func (*GuildNewsChannel) UpdateGuildChannel ¶
func (c *GuildNewsChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildNewsChannel) UpdateMessage ¶
func (c *GuildNewsChannel) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildNewsChannel) UpdatePermissionOverwrite ¶
func (c *GuildNewsChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type GuildNewsThread ¶
type GuildNewsThread struct {
discord.GuildNewsThread
Bot *Bot
}
func (*GuildNewsThread) AddReaction ¶
func (c *GuildNewsThread) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildNewsThread) AddThreadMember ¶
func (c *GuildNewsThread) AddThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsThread) BulkDeleteMessages ¶
func (c *GuildNewsThread) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsThread) CreateMessage ¶
func (c *GuildNewsThread) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildNewsThread) Delete ¶
func (c *GuildNewsThread) Delete(opts ...rest.RequestOpt) error
func (*GuildNewsThread) DeleteMessage ¶
func (c *GuildNewsThread) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsThread) DeletePermissionOverwrite ¶
func (c *GuildNewsThread) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsThread) GetMessage ¶
func (c *GuildNewsThread) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*GuildNewsThread) GetMessages ¶
func (*GuildNewsThread) GetThreadMember ¶
func (c *GuildNewsThread) GetThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) (*ThreadMember, error)
func (*GuildNewsThread) GetThreadMembers ¶
func (c *GuildNewsThread) GetThreadMembers(opts ...rest.RequestOpt) ([]*ThreadMember, error)
func (*GuildNewsThread) Guild ¶
func (c *GuildNewsThread) Guild() *Guild
func (*GuildNewsThread) Join ¶
func (c *GuildNewsThread) Join(opts ...rest.RequestOpt) error
func (*GuildNewsThread) Leave ¶
func (c *GuildNewsThread) Leave(opts ...rest.RequestOpt) error
func (*GuildNewsThread) MemberPermissionOverwrite ¶
func (c *GuildNewsThread) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildNewsThread) Members ¶
func (c *GuildNewsThread) Members() []*Member
func (*GuildNewsThread) Parent ¶
func (c *GuildNewsThread) Parent() *GuildNewsChannel
func (*GuildNewsThread) ParentMessageChannel ¶
func (c *GuildNewsThread) ParentMessageChannel() GuildMessageChannel
func (*GuildNewsThread) PermissionOverwrite ¶
func (c *GuildNewsThread) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildNewsThread) PermissionOverwrites ¶
func (c *GuildNewsThread) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildNewsThread) RemoveAllReactions ¶
func (c *GuildNewsThread) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsThread) RemoveAllReactionsForEmoji ¶
func (c *GuildNewsThread) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildNewsThread) RemoveOwnReaction ¶
func (c *GuildNewsThread) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildNewsThread) RemoveThreadMember ¶
func (c *GuildNewsThread) RemoveThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsThread) RemoveUserReaction ¶
func (c *GuildNewsThread) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildNewsThread) RolePermissionOverwrite ¶
func (c *GuildNewsThread) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildNewsThread) SelfThreadMember ¶
func (c *GuildNewsThread) SelfThreadMember() *ThreadMember
func (*GuildNewsThread) SendTyping ¶
func (c *GuildNewsThread) SendTyping(opts ...rest.RequestOpt) error
func (*GuildNewsThread) SetPermissionOverwrite ¶
func (c *GuildNewsThread) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildNewsThread) ThreadMember ¶
func (c *GuildNewsThread) ThreadMember(userID discord.Snowflake) *ThreadMember
func (*GuildNewsThread) ThreadMembers ¶
func (c *GuildNewsThread) ThreadMembers() []*ThreadMember
func (*GuildNewsThread) Update ¶
func (c *GuildNewsThread) Update(channelUpdate discord.GuildNewsThreadUpdate, opts ...rest.RequestOpt) (*GuildNewsThread, error)
func (*GuildNewsThread) UpdateGuildChannel ¶
func (c *GuildNewsThread) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildNewsThread) UpdateMessage ¶
func (c *GuildNewsThread) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildNewsThread) UpdatePermissionOverwrite ¶
func (c *GuildNewsThread) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type GuildPrivateThread ¶
type GuildPrivateThread struct {
discord.GuildPrivateThread
Bot *Bot
}
func (*GuildPrivateThread) AddReaction ¶
func (c *GuildPrivateThread) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) AddThreadMember ¶
func (c *GuildPrivateThread) AddThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) BulkDeleteMessages ¶
func (c *GuildPrivateThread) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) CreateMessage ¶
func (c *GuildPrivateThread) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildPrivateThread) Delete ¶
func (c *GuildPrivateThread) Delete(opts ...rest.RequestOpt) error
func (*GuildPrivateThread) DeleteMessage ¶
func (c *GuildPrivateThread) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) DeletePermissionOverwrite ¶
func (c *GuildPrivateThread) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) GetMessage ¶
func (c *GuildPrivateThread) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*GuildPrivateThread) GetMessages ¶
func (*GuildPrivateThread) GetThreadMember ¶
func (c *GuildPrivateThread) GetThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) (*ThreadMember, error)
func (*GuildPrivateThread) GetThreadMembers ¶
func (c *GuildPrivateThread) GetThreadMembers(opts ...rest.RequestOpt) ([]*ThreadMember, error)
func (*GuildPrivateThread) Guild ¶
func (c *GuildPrivateThread) Guild() *Guild
func (*GuildPrivateThread) Join ¶
func (c *GuildPrivateThread) Join(opts ...rest.RequestOpt) error
func (*GuildPrivateThread) Leave ¶
func (c *GuildPrivateThread) Leave(opts ...rest.RequestOpt) error
func (*GuildPrivateThread) MemberPermissionOverwrite ¶
func (c *GuildPrivateThread) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildPrivateThread) Members ¶
func (c *GuildPrivateThread) Members() []*Member
func (*GuildPrivateThread) Parent ¶
func (c *GuildPrivateThread) Parent() *GuildTextChannel
func (*GuildPrivateThread) ParentMessageChannel ¶
func (c *GuildPrivateThread) ParentMessageChannel() GuildMessageChannel
func (*GuildPrivateThread) PermissionOverwrite ¶
func (c *GuildPrivateThread) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildPrivateThread) PermissionOverwrites ¶
func (c *GuildPrivateThread) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildPrivateThread) RemoveAllReactions ¶
func (c *GuildPrivateThread) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) RemoveAllReactionsForEmoji ¶
func (c *GuildPrivateThread) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) RemoveOwnReaction ¶
func (c *GuildPrivateThread) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) RemoveThreadMember ¶
func (c *GuildPrivateThread) RemoveThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) RemoveUserReaction ¶
func (c *GuildPrivateThread) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) RolePermissionOverwrite ¶
func (c *GuildPrivateThread) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildPrivateThread) SelfThreadMember ¶
func (c *GuildPrivateThread) SelfThreadMember() *ThreadMember
func (*GuildPrivateThread) SendTyping ¶
func (c *GuildPrivateThread) SendTyping(opts ...rest.RequestOpt) error
func (*GuildPrivateThread) SetPermissionOverwrite ¶
func (c *GuildPrivateThread) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildPrivateThread) ThreadMember ¶
func (c *GuildPrivateThread) ThreadMember(userID discord.Snowflake) *ThreadMember
func (*GuildPrivateThread) ThreadMembers ¶
func (c *GuildPrivateThread) ThreadMembers() []*ThreadMember
func (*GuildPrivateThread) Update ¶
func (c *GuildPrivateThread) Update(channelUpdate discord.GuildNewsThreadUpdate, opts ...rest.RequestOpt) (*GuildPrivateThread, error)
func (*GuildPrivateThread) UpdateGuildChannel ¶
func (c *GuildPrivateThread) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildPrivateThread) UpdateMessage ¶
func (c *GuildPrivateThread) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildPrivateThread) UpdatePermissionOverwrite ¶
func (c *GuildPrivateThread) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type GuildPublicThread ¶
type GuildPublicThread struct {
discord.GuildPublicThread
Bot *Bot
}
func (*GuildPublicThread) AddReaction ¶
func (c *GuildPublicThread) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildPublicThread) AddThreadMember ¶
func (c *GuildPublicThread) AddThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPublicThread) BulkDeleteMessages ¶
func (c *GuildPublicThread) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPublicThread) CreateMessage ¶
func (c *GuildPublicThread) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildPublicThread) Delete ¶
func (c *GuildPublicThread) Delete(opts ...rest.RequestOpt) error
func (*GuildPublicThread) DeleteMessage ¶
func (c *GuildPublicThread) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPublicThread) DeletePermissionOverwrite ¶
func (c *GuildPublicThread) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPublicThread) GetMessage ¶
func (c *GuildPublicThread) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*GuildPublicThread) GetMessages ¶
func (*GuildPublicThread) GetThreadMember ¶
func (c *GuildPublicThread) GetThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) (*ThreadMember, error)
func (*GuildPublicThread) GetThreadMembers ¶
func (c *GuildPublicThread) GetThreadMembers(opts ...rest.RequestOpt) ([]*ThreadMember, error)
func (*GuildPublicThread) Guild ¶
func (c *GuildPublicThread) Guild() *Guild
func (*GuildPublicThread) Join ¶
func (c *GuildPublicThread) Join(opts ...rest.RequestOpt) error
func (*GuildPublicThread) Leave ¶
func (c *GuildPublicThread) Leave(opts ...rest.RequestOpt) error
func (*GuildPublicThread) MemberPermissionOverwrite ¶
func (c *GuildPublicThread) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildPublicThread) Members ¶
func (c *GuildPublicThread) Members() []*Member
func (*GuildPublicThread) Parent ¶
func (c *GuildPublicThread) Parent() *GuildTextChannel
func (*GuildPublicThread) ParentMessageChannel ¶
func (c *GuildPublicThread) ParentMessageChannel() GuildMessageChannel
func (*GuildPublicThread) PermissionOverwrite ¶
func (c *GuildPublicThread) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildPublicThread) PermissionOverwrites ¶
func (c *GuildPublicThread) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildPublicThread) RemoveAllReactions ¶
func (c *GuildPublicThread) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPublicThread) RemoveAllReactionsForEmoji ¶
func (c *GuildPublicThread) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildPublicThread) RemoveOwnReaction ¶
func (c *GuildPublicThread) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildPublicThread) RemoveThreadMember ¶
func (c *GuildPublicThread) RemoveThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPublicThread) RemoveUserReaction ¶
func (c *GuildPublicThread) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildPublicThread) RolePermissionOverwrite ¶
func (c *GuildPublicThread) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildPublicThread) SelfThreadMember ¶
func (c *GuildPublicThread) SelfThreadMember() *ThreadMember
func (*GuildPublicThread) SendTyping ¶
func (c *GuildPublicThread) SendTyping(opts ...rest.RequestOpt) error
func (*GuildPublicThread) SetPermissionOverwrite ¶
func (c *GuildPublicThread) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildPublicThread) ThreadMember ¶
func (c *GuildPublicThread) ThreadMember(userID discord.Snowflake) *ThreadMember
func (*GuildPublicThread) ThreadMembers ¶
func (c *GuildPublicThread) ThreadMembers() []*ThreadMember
func (*GuildPublicThread) Update ¶
func (c *GuildPublicThread) Update(channelUpdate discord.GuildNewsThreadUpdate, opts ...rest.RequestOpt) (*GuildPublicThread, error)
func (*GuildPublicThread) UpdateGuildChannel ¶
func (c *GuildPublicThread) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildPublicThread) UpdateMessage ¶
func (c *GuildPublicThread) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildPublicThread) UpdatePermissionOverwrite ¶
func (c *GuildPublicThread) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type GuildScheduledEvent ¶ added in v0.6.1
type GuildScheduledEvent struct {
discord.GuildScheduledEvent
Creator *User
Bot *Bot
}
func (*GuildScheduledEvent) AudioChannel ¶ added in v0.6.1
func (e *GuildScheduledEvent) AudioChannel() GuildAudioChannel
func (*GuildScheduledEvent) Channel ¶ added in v0.6.1
func (e *GuildScheduledEvent) Channel() GuildChannel
func (*GuildScheduledEvent) Delete ¶ added in v0.6.1
func (e *GuildScheduledEvent) Delete(opts ...rest.RequestOpt) error
func (*GuildScheduledEvent) GetUsers ¶ added in v0.6.1
func (e *GuildScheduledEvent) GetUsers(limit int, withMember bool, before discord.Snowflake, after discord.Snowflake, opts ...rest.RequestOpt) ([]*GuildScheduledEventUser, error)
func (*GuildScheduledEvent) Guild ¶ added in v0.6.1
func (e *GuildScheduledEvent) Guild() *Guild
func (*GuildScheduledEvent) StageInstanceEntity ¶ added in v0.6.1
func (e *GuildScheduledEvent) StageInstanceEntity() *StageInstance
func (*GuildScheduledEvent) Update ¶ added in v0.6.1
func (e *GuildScheduledEvent) Update(guildScheduledEventUpdate discord.GuildScheduledEventUpdate, opts ...rest.RequestOpt) (*GuildScheduledEvent, error)
func (*GuildScheduledEvent) VoiceChannelEntity ¶ added in v0.6.1
func (e *GuildScheduledEvent) VoiceChannelEntity() *GuildVoiceChannel
type GuildScheduledEventCache ¶ added in v0.6.1
type GuildScheduledEventCache interface {
Get(guildScheduledEventID discord.Snowflake) *GuildScheduledEvent
GetCopy(guildScheduledEventID discord.Snowflake) *GuildScheduledEvent
Set(guildScheduledEvent *GuildScheduledEvent) *GuildScheduledEvent
Remove(guildScheduledEventID discord.Snowflake)
Cache() map[discord.Snowflake]*GuildScheduledEvent
All() []*GuildScheduledEvent
FindFirst(guildScheduledEventFindFunc GuildScheduledEventFindFunc) *GuildScheduledEvent
FindAll(guildScheduledEventFindFunc GuildScheduledEventFindFunc) []*GuildScheduledEvent
}
func NewGuildScheduledEventCache ¶ added in v0.6.1
func NewGuildScheduledEventCache(cacheFlags CacheFlags) GuildScheduledEventCache
type GuildScheduledEventFindFunc ¶ added in v0.6.1
type GuildScheduledEventFindFunc func(guildScheduledEvent *GuildScheduledEvent) bool
type GuildScheduledEventUser ¶ added in v0.6.1
type GuildScheduledEventUser struct {
discord.GuildScheduledEventUser
User *User
Member *Member
Bot *Bot
}
type GuildStageVoiceChannel ¶
type GuildStageVoiceChannel struct {
discord.GuildStageVoiceChannel
Bot *Bot
StageInstanceID *discord.Snowflake
ConnectedMemberIDs map[discord.Snowflake]struct{}
}
func (*GuildStageVoiceChannel) Connect ¶
func (c *GuildStageVoiceChannel) Connect(ctx context.Context) error
func (*GuildStageVoiceChannel) CreateStageInstance ¶
func (c *GuildStageVoiceChannel) CreateStageInstance(stageInstanceCreate discord.StageInstanceCreate, opts ...rest.RequestOpt) (*StageInstance, error)
func (*GuildStageVoiceChannel) Delete ¶
func (c *GuildStageVoiceChannel) Delete(opts ...rest.RequestOpt) error
func (*GuildStageVoiceChannel) DeletePermissionOverwrite ¶
func (c *GuildStageVoiceChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildStageVoiceChannel) DeleteStageInstance ¶
func (c *GuildStageVoiceChannel) DeleteStageInstance(opts ...rest.RequestOpt) error
func (*GuildStageVoiceChannel) Guild ¶
func (c *GuildStageVoiceChannel) Guild() *Guild
func (*GuildStageVoiceChannel) IsModerator ¶
func (c *GuildStageVoiceChannel) IsModerator(member *Member) bool
func (*GuildStageVoiceChannel) MemberPermissionOverwrite ¶
func (c *GuildStageVoiceChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildStageVoiceChannel) Members ¶
func (c *GuildStageVoiceChannel) Members() []*Member
func (*GuildStageVoiceChannel) Parent ¶
func (c *GuildStageVoiceChannel) Parent() *GuildCategoryChannel
func (*GuildStageVoiceChannel) PermissionOverwrite ¶
func (c *GuildStageVoiceChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildStageVoiceChannel) PermissionOverwrites ¶
func (c *GuildStageVoiceChannel) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildStageVoiceChannel) RolePermissionOverwrite ¶
func (c *GuildStageVoiceChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildStageVoiceChannel) SetPermissionOverwrite ¶
func (c *GuildStageVoiceChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildStageVoiceChannel) StageInstance ¶
func (c *GuildStageVoiceChannel) StageInstance() *StageInstance
func (*GuildStageVoiceChannel) Update ¶
func (c *GuildStageVoiceChannel) Update(channelUpdate discord.GuildStageVoiceChannelUpdate, opts ...rest.RequestOpt) (*GuildStageVoiceChannel, error)
Update updates the GuildNewsChannel which can return either a GuildNewsChannel or a GuildTextChannel
func (*GuildStageVoiceChannel) UpdateGuildChannel ¶
func (c *GuildStageVoiceChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildStageVoiceChannel) UpdatePermissionOverwrite ¶
func (c *GuildStageVoiceChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildStageVoiceChannel) UpdateStageInstance ¶
func (c *GuildStageVoiceChannel) UpdateStageInstance(stageInstanceUpdate discord.StageInstanceUpdate, opts ...rest.RequestOpt) (*StageInstance, error)
type GuildStoreChannel ¶
type GuildStoreChannel struct {
discord.GuildStoreChannel
Bot *Bot
}
func (*GuildStoreChannel) Delete ¶
func (c *GuildStoreChannel) Delete(opts ...rest.RequestOpt) error
func (*GuildStoreChannel) DeletePermissionOverwrite ¶
func (c *GuildStoreChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildStoreChannel) Guild ¶
func (c *GuildStoreChannel) Guild() *Guild
func (*GuildStoreChannel) MemberPermissionOverwrite ¶
func (c *GuildStoreChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildStoreChannel) Members ¶
func (c *GuildStoreChannel) Members() []*Member
func (*GuildStoreChannel) Parent ¶
func (c *GuildStoreChannel) Parent() *GuildCategoryChannel
func (*GuildStoreChannel) PermissionOverwrite ¶
func (c *GuildStoreChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildStoreChannel) PermissionOverwrites ¶
func (c *GuildStoreChannel) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildStoreChannel) RolePermissionOverwrite ¶
func (c *GuildStoreChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildStoreChannel) SetPermissionOverwrite ¶
func (c *GuildStoreChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildStoreChannel) Update ¶
func (c *GuildStoreChannel) Update(channelUpdate discord.GuildStoreChannelUpdate, opts ...rest.RequestOpt) (*GuildStoreChannel, error)
Update updates the GuildNewsChannel which can return either a GuildNewsChannel or a GuildTextChannel
func (*GuildStoreChannel) UpdateGuildChannel ¶
func (c *GuildStoreChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildStoreChannel) UpdatePermissionOverwrite ¶
func (c *GuildStoreChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type GuildTemplate ¶
type GuildTemplate struct {
discord.GuildTemplate
Bot *Bot
Creator *User
}
func (*GuildTemplate) CreateGuild ¶
func (t *GuildTemplate) CreateGuild(createGuildFromTemplate discord.GuildFromTemplateCreate, opts ...rest.RequestOpt) (*Guild, error)
CreateGuild creates a Guild from this discord.GuildTemplate
func (*GuildTemplate) Delete ¶
func (t *GuildTemplate) Delete(opts ...rest.RequestOpt) (*GuildTemplate, error)
Delete deletes the GuildTemplate
func (*GuildTemplate) Guild ¶
func (t *GuildTemplate) Guild() *Guild
Guild returns the Guild this GuildTemplate is for. This will only check cached guilds!
func (*GuildTemplate) Sync ¶
func (t *GuildTemplate) Sync(opts ...rest.RequestOpt) (*GuildTemplate, error)
Sync updates the GuildTemplate with the provided discord.UpdateGuildTemplate
func (*GuildTemplate) Update ¶
func (t *GuildTemplate) Update(guildTemplateUpdate discord.GuildTemplateUpdate, opts ...rest.RequestOpt) (*GuildTemplate, error)
Update updates the GuildTemplate with the provided discord.UpdateGuildTemplate
type GuildTextChannel ¶
type GuildTextChannel struct {
discord.GuildTextChannel
Bot *Bot
}
func (*GuildTextChannel) AddReaction ¶
func (c *GuildTextChannel) AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildTextChannel) BulkDeleteMessages ¶
func (c *GuildTextChannel) BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildTextChannel) CreateMessage ¶
func (c *GuildTextChannel) CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildTextChannel) CreateThread ¶
func (c *GuildTextChannel) CreateThread(theadCreate discord.ThreadCreate, opts ...rest.RequestOpt) (GuildThread, error)
func (*GuildTextChannel) CreateThreadWithMessage ¶
func (c *GuildTextChannel) CreateThreadWithMessage(messageID discord.Snowflake, threadCreateWithMessage discord.ThreadCreateWithMessage, opts ...rest.RequestOpt) (GuildThread, error)
func (*GuildTextChannel) CreateWebhook ¶
func (c *GuildTextChannel) CreateWebhook(webhookCreate discord.WebhookCreate, opts ...rest.RequestOpt) (Webhook, error)
func (*GuildTextChannel) Delete ¶
func (c *GuildTextChannel) Delete(opts ...rest.RequestOpt) error
func (*GuildTextChannel) DeleteMessage ¶
func (c *GuildTextChannel) DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildTextChannel) DeletePermissionOverwrite ¶
func (c *GuildTextChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildTextChannel) DeleteWebhook ¶
func (c *GuildTextChannel) DeleteWebhook(webhookID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildTextChannel) GetJoinedPrivateAchievedThreads ¶
func (c *GuildTextChannel) GetJoinedPrivateAchievedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]*GuildPrivateThread, map[discord.Snowflake]*ThreadMember, bool, error)
func (*GuildTextChannel) GetMessage ¶
func (c *GuildTextChannel) GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*GuildTextChannel) GetMessages ¶
func (*GuildTextChannel) GetPrivateArchivedThreads ¶
func (c *GuildTextChannel) GetPrivateArchivedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]*GuildPrivateThread, map[discord.Snowflake]*ThreadMember, bool, error)
func (*GuildTextChannel) GetPublicArchivedThreads ¶
func (c *GuildTextChannel) GetPublicArchivedThreads(before discord.Time, limit int, opts ...rest.RequestOpt) ([]GuildThread, map[discord.Snowflake]*ThreadMember, bool, error)
func (*GuildTextChannel) GetWebhooks ¶
func (c *GuildTextChannel) GetWebhooks(opts ...rest.RequestOpt) ([]Webhook, error)
func (*GuildTextChannel) Guild ¶
func (c *GuildTextChannel) Guild() *Guild
func (*GuildTextChannel) MemberPermissionOverwrite ¶
func (c *GuildTextChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildTextChannel) Members ¶
func (c *GuildTextChannel) Members() []*Member
func (*GuildTextChannel) Parent ¶
func (c *GuildTextChannel) Parent() *GuildCategoryChannel
func (*GuildTextChannel) PermissionOverwrite ¶
func (c *GuildTextChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildTextChannel) PermissionOverwrites ¶
func (c *GuildTextChannel) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildTextChannel) PrivateThreads ¶
func (c *GuildTextChannel) PrivateThreads() []*GuildPrivateThread
func (*GuildTextChannel) PublicThreads ¶
func (c *GuildTextChannel) PublicThreads() []*GuildPublicThread
func (*GuildTextChannel) RemoveAllReactions ¶
func (c *GuildTextChannel) RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildTextChannel) RemoveAllReactionsForEmoji ¶
func (c *GuildTextChannel) RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildTextChannel) RemoveOwnReaction ¶
func (c *GuildTextChannel) RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
func (*GuildTextChannel) RemoveUserReaction ¶
func (c *GuildTextChannel) RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildTextChannel) RolePermissionOverwrite ¶
func (c *GuildTextChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildTextChannel) SendTyping ¶
func (c *GuildTextChannel) SendTyping(opts ...rest.RequestOpt) error
func (*GuildTextChannel) SetPermissionOverwrite ¶
func (c *GuildTextChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildTextChannel) Thread ¶
func (c *GuildTextChannel) Thread(threadID discord.Snowflake) GuildThread
func (*GuildTextChannel) Threads ¶
func (c *GuildTextChannel) Threads() []GuildThread
func (*GuildTextChannel) Update ¶
func (c *GuildTextChannel) Update(channelUpdate discord.GuildTextChannelUpdate, opts ...rest.RequestOpt) (GuildMessageChannel, error)
Update updates the GuildNewsChannel which can return either a GuildNewsChannel or a GuildTextChannel
func (*GuildTextChannel) UpdateGuildChannel ¶
func (c *GuildTextChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildTextChannel) UpdateMessage ¶
func (c *GuildTextChannel) UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*GuildTextChannel) UpdatePermissionOverwrite ¶
func (c *GuildTextChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type GuildThread ¶
type GuildThread interface {
discord.GuildThread
BaseGuildMessageChannel
ParentMessageChannel() GuildMessageChannel
SelfThreadMember() *ThreadMember
ThreadMember(userID discord.Snowflake) *ThreadMember
ThreadMembers() []*ThreadMember
Join(opts ...rest.RequestOpt) error
Leave(opts ...rest.RequestOpt) error
AddThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
RemoveThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) error
GetThreadMember(userID discord.Snowflake, opts ...rest.RequestOpt) (*ThreadMember, error)
GetThreadMembers(opts ...rest.RequestOpt) ([]*ThreadMember, error)
}
type GuildVoiceChannel ¶
type GuildVoiceChannel struct {
discord.GuildVoiceChannel
Bot *Bot
ConnectedMemberIDs map[discord.Snowflake]struct{}
}
func (*GuildVoiceChannel) Delete ¶
func (c *GuildVoiceChannel) Delete(opts ...rest.RequestOpt) error
func (*GuildVoiceChannel) DeletePermissionOverwrite ¶
func (c *GuildVoiceChannel) DeletePermissionOverwrite(id discord.Snowflake, opts ...rest.RequestOpt) error
func (*GuildVoiceChannel) Guild ¶
func (c *GuildVoiceChannel) Guild() *Guild
func (*GuildVoiceChannel) MemberPermissionOverwrite ¶
func (c *GuildVoiceChannel) MemberPermissionOverwrite(id discord.Snowflake) *discord.MemberPermissionOverwrite
func (*GuildVoiceChannel) Members ¶
func (c *GuildVoiceChannel) Members() []*Member
func (*GuildVoiceChannel) Parent ¶
func (c *GuildVoiceChannel) Parent() *GuildCategoryChannel
func (*GuildVoiceChannel) PermissionOverwrite ¶
func (c *GuildVoiceChannel) PermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake) discord.PermissionOverwrite
func (*GuildVoiceChannel) PermissionOverwrites ¶
func (c *GuildVoiceChannel) PermissionOverwrites() []discord.PermissionOverwrite
func (*GuildVoiceChannel) RolePermissionOverwrite ¶
func (c *GuildVoiceChannel) RolePermissionOverwrite(id discord.Snowflake) *discord.RolePermissionOverwrite
func (*GuildVoiceChannel) SetPermissionOverwrite ¶
func (c *GuildVoiceChannel) SetPermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
func (*GuildVoiceChannel) Update ¶
func (c *GuildVoiceChannel) Update(channelUpdate discord.GuildVoiceChannelUpdate, opts ...rest.RequestOpt) (*GuildVoiceChannel, error)
Update updates the GuildNewsChannel which can return either a GuildNewsChannel or a GuildTextChannel
func (*GuildVoiceChannel) UpdateGuildChannel ¶
func (c *GuildVoiceChannel) UpdateGuildChannel(guildChannelUpdate discord.GuildChannelUpdate, opts ...rest.RequestOpt) (GuildChannel, error)
func (*GuildVoiceChannel) UpdatePermissionOverwrite ¶
func (c *GuildVoiceChannel) UpdatePermissionOverwrite(overwriteType discord.PermissionOverwriteType, id discord.Snowflake, allow discord.Permissions, deny discord.Permissions, opts ...rest.RequestOpt) error
type HTTPServerEventHandler ¶
type HTTPServerEventHandler interface {
New() interface{}
HandleHTTPEvent(bot *Bot, responseChannel chan<- discord.InteractionResponse, v interface{})
}
HTTPServerEventHandler is used to handle HTTP Event(s)
type IncomingWebhook ¶
type IncomingWebhook struct {
discord.IncomingWebhook
Bot *Bot
User *User
}
func (*IncomingWebhook) Delete ¶
func (h *IncomingWebhook) Delete(opts ...rest.RequestOpt) error
func (*IncomingWebhook) NewWebhookClient ¶
func (h *IncomingWebhook) NewWebhookClient(opts ...webhook.ConfigOpt) *webhook.Client
func (*IncomingWebhook) URL ¶
func (h *IncomingWebhook) URL() string
func (*IncomingWebhook) Update ¶
func (h *IncomingWebhook) Update(webhookUpdate discord.WebhookUpdate, opts ...rest.RequestOpt) (*IncomingWebhook, error)
type Integration ¶
type Integration interface {
discord.Integration
}
type IntegrationApplication ¶
type IntegrationApplication struct {
discord.IntegrationApplication
Bot *User
}
type Interaction ¶
type Interaction interface {
discord.Interaction
}
Interaction represents a generic Interaction received from discord
type InteractionFields ¶
type InteractionFilter ¶
type InteractionFilter func(interaction Interaction) bool
type Invite ¶
func (*Invite) Delete ¶
func (i *Invite) Delete(opts ...rest.RequestOpt) (*Invite, error)
Delete deletes this Invite
func (*Invite) URL ¶
URL returns the invite URL in format like https://discord.gg/{code}
type Member ¶
func (*Member) Ban ¶
func (m *Member) Ban(deleteMessageDays int, opts ...rest.RequestOpt) error
Ban bans this Member from the Guild
func (*Member) ChannelPermissions ¶
func (m *Member) ChannelPermissions(channel GuildChannel) discord.Permissions
ChannelPermissions returns the Permissions the Member has in the provided Channel
func (*Member) EffectiveAvatarURL ¶
EffectiveAvatarURL returns either the server avatar or global avatar depending on if the user has one
func (*Member) Guild ¶
Guild returns the Guild this Member is tied to. This will only check cached guilds!
func (*Member) InteractionPermissions ¶
func (m *Member) InteractionPermissions() discord.Permissions
InteractionPermissions returns the Permissions the Member has in this Channel for this Interaction
func (*Member) Kick ¶
func (m *Member) Kick(opts ...rest.RequestOpt) error
Kick kicks this Member from the Guild
func (*Member) Permissions ¶
func (m *Member) Permissions() discord.Permissions
Permissions returns the calculated Permissions the Member has in the Guild
func (*Member) RemoveRole ¶
RemoveRole removes a specific Role this Member
func (*Member) Unban ¶
func (m *Member) Unban(opts ...rest.RequestOpt) error
Unban unbans this Member from the Guild
func (*Member) Update ¶
func (m *Member) Update(updateGuildMember discord.MemberUpdate, opts ...rest.RequestOpt) (*Member, error)
Update updates the Member with the properties provided in discord.MemberUpdate
func (*Member) VoiceState ¶
func (m *Member) VoiceState() *VoiceState
VoiceState returns the VoiceState for this Member. This will only check cached voice states! (requires core.CacheFlagVoiceStates and discord.GatewayIntentGuildVoiceStates)
type MemberCache ¶
type MemberCache interface {
Get(guildID discord.Snowflake, userID discord.Snowflake) *Member
GetCopy(guildID discord.Snowflake, userID discord.Snowflake) *Member
Set(member *Member) *Member
Remove(guildID discord.Snowflake, userID discord.Snowflake)
RemoveAll(guildID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*Member
All() map[discord.Snowflake][]*Member
GuildCache(guildID discord.Snowflake) map[discord.Snowflake]*Member
GuildAll(guildID discord.Snowflake) []*Member
FindFirst(memberFindFunc MemberFindFunc) *Member
FindAll(memberFindFunc MemberFindFunc) []*Member
}
func NewMemberCache ¶
func NewMemberCache(memberCachePolicy MemberCachePolicy) MemberCache
type MemberCachePolicy ¶
MemberCachePolicy can be used to define your own policy for caching members
var ( MemberCachePolicyNone MemberCachePolicy = func(_ *Member) bool { return false } MemberCachePolicyAll MemberCachePolicy = func(_ *Member) bool { return true } MemberCachePolicyOwner MemberCachePolicy = func(member *Member) bool { return member.IsOwner() } MemberCachePolicyOnline MemberCachePolicy = func(_ *Member) bool { return false } MemberCachePolicyVoice MemberCachePolicy = func(member *Member) bool { return false } MemberCachePolicyPending MemberCachePolicy = func(member *Member) bool { return member.Pending } MemberCachePolicyDefault = MemberCachePolicyOwner.Or(MemberCachePolicyVoice) )
Default member caches policies
func MemberCachePolicyAllOf ¶
func MemberCachePolicyAllOf(policy MemberCachePolicy, policies ...MemberCachePolicy) MemberCachePolicy
MemberCachePolicyAllOf is a shorthand for MemberCachePolicy.And(MemberCachePolicy).And(MemberCachePolicy) etc.
func MemberCachePolicyAnyOf ¶
func MemberCachePolicyAnyOf(policy MemberCachePolicy, policies ...MemberCachePolicy) MemberCachePolicy
MemberCachePolicyAnyOf is a shorthand for MemberCachePolicy.Or(MemberCachePolicy).Or(MemberCachePolicy) etc.
func (MemberCachePolicy) And ¶
func (p MemberCachePolicy) And(policy MemberCachePolicy) MemberCachePolicy
And allows you to require both policies to be true for the member to be cached
func (MemberCachePolicy) Or ¶
func (p MemberCachePolicy) Or(policy MemberCachePolicy) MemberCachePolicy
Or allows you to combine that policy with another, meaning either needs to be true
type MemberChunkingFilter ¶
var ( MemberChunkingFilterAll MemberChunkingFilter = func(_ discord.Snowflake) bool { return true } MemberChunkingFilterNone MemberChunkingFilter = func(_ discord.Snowflake) bool { return false } )
func (MemberChunkingFilter) Exclude ¶
func (f MemberChunkingFilter) Exclude(guildIDs ...discord.Snowflake) MemberChunkingFilter
func (MemberChunkingFilter) Include ¶
func (f MemberChunkingFilter) Include(guildIDs ...discord.Snowflake) MemberChunkingFilter
type MemberChunkingManager ¶
type MemberChunkingManager interface {
Bot() *Bot
MemberChunkingFilter() MemberChunkingFilter
HandleChunk(payload discord.GuildMembersChunkGatewayEvent)
RequestMembers(guildID discord.Snowflake, userIDs ...discord.Snowflake) ([]*Member, error)
RequestMembersWithQuery(guildID discord.Snowflake, query string, limit int) ([]*Member, error)
RequestMembersWithFilter(guildID discord.Snowflake, memberFilterFunc func(member *Member) bool) ([]*Member, error)
RequestMembersCtx(ctx context.Context, guildID discord.Snowflake, userIDs ...discord.Snowflake) ([]*Member, error)
RequestMembersWithQueryCtx(ctx context.Context, guildID discord.Snowflake, query string, limit int) ([]*Member, error)
RequestMembersWithFilterCtx(ctx context.Context, guildID discord.Snowflake, memberFilterFunc func(member *Member) bool) ([]*Member, error)
RequestMembersChan(guildID discord.Snowflake, userIDs ...discord.Snowflake) (<-chan *Member, func(), error)
RequestMembersWithQueryChan(guildID discord.Snowflake, query string, limit int) (<-chan *Member, func(), error)
RequestMembersWithFilterChan(guildID discord.Snowflake, memberFilterFunc func(member *Member) bool) (<-chan *Member, func(), error)
}
func NewMemberChunkingManager ¶
func NewMemberChunkingManager(bot *Bot, memberChunkingFilter MemberChunkingFilter) MemberChunkingManager
type MemberFindFunc ¶
type Mentionable ¶
type Mentionable interface {
Mention() string
}
type Message ¶
type Message struct {
discord.Message
Bot *Bot
Member *Member
Author *User
Stickers []*MessageSticker
}
func (*Message) ActionRows ¶
func (m *Message) ActionRows() []discord.ActionRowComponent
ActionRows returns all discord.ActionRowComponent(s) from this Message
func (*Message) AddReaction ¶
func (m *Message) AddReaction(emoji string, opts ...rest.RequestOpt) error
AddReaction allows you to add a reaction to a message_events from a string, for _examples a custom emoji CommandID, or a native emoji
func (*Message) AddReactionByEmote ¶
func (m *Message) AddReactionByEmote(emote Emoji, opts ...rest.RequestOpt) error
AddReactionByEmote allows you to add an Emoji to a message_events via reaction
func (*Message) ButtonByID ¶
func (m *Message) ButtonByID(customID discord.CustomID) *discord.ButtonComponent
ButtonByID returns a ButtonComponent with the specific customID from this Message
func (*Message) Buttons ¶
func (m *Message) Buttons() []discord.ButtonComponent
Buttons returns all ButtonComponent(s) from this Message
func (*Message) Channel ¶
func (m *Message) Channel() MessageChannel
Channel gets the MessageChannel the Message was sent in
func (*Message) ComponentByID ¶
func (m *Message) ComponentByID(customID discord.CustomID) discord.InteractiveComponent
ComponentByID returns the discord.Component with the specific discord.CustomID
func (*Message) CreateThread ¶
func (m *Message) CreateThread(threadCreateWithMessage discord.ThreadCreateWithMessage, opts ...rest.RequestOpt) (GuildThread, error)
func (*Message) Crosspost ¶
func (m *Message) Crosspost(opts ...rest.RequestOpt) (*Message, error)
Crosspost crossposts an existing message
func (*Message) Delete ¶
func (m *Message) Delete(opts ...rest.RequestOpt) error
Delete deletes this Message
func (*Message) Guild ¶
Guild returns the Guild this Message was sent in. This will only check cached guilds!
func (*Message) InteractiveComponents ¶
func (m *Message) InteractiveComponents() []discord.InteractiveComponent
InteractiveComponents returns the discord.InteractiveComponent(s) from this Message
func (*Message) IsEphemeral ¶
IsEphemeral returns true if the Message has MessageFlagEphemeral
func (*Message) IsWebhookMessage ¶
IsWebhookMessage returns true if the Message was sent by a Webhook
func (*Message) Reply ¶
func (m *Message) Reply(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
Reply replies to this Message
func (*Message) SelectMenuByID ¶
func (m *Message) SelectMenuByID(customID discord.CustomID) *discord.SelectMenuComponent
SelectMenuByID returns a SelectMenuComponent with the specific customID from this Message
func (*Message) SelectMenus ¶
func (m *Message) SelectMenus() []discord.SelectMenuComponent
SelectMenus returns all SelectMenuComponent(s) from this Message
func (*Message) Update ¶
func (m *Message) Update(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
Update allows you to edit an existing Message sent by you
type MessageCache ¶
type MessageCache interface {
Get(channelID discord.Snowflake, messageID discord.Snowflake) *Message
GetCopy(channelID discord.Snowflake, messageID discord.Snowflake) *Message
Set(message *Message) *Message
Remove(channelID discord.Snowflake, messageID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*Message
All() map[discord.Snowflake][]*Message
ChannelCache(channelID discord.Snowflake) map[discord.Snowflake]*Message
ChannelAll(channelID discord.Snowflake) []*Message
FindFirst(messageFindFunc MessageFindFunc) *Message
FindAll(messageFindFunc MessageFindFunc) []*Message
}
func NewMessageCache ¶
func NewMessageCache(messageCachePolicy MessageCachePolicy) MessageCache
type MessageCachePolicy ¶
MessageCachePolicy can be used to define your own policy for caching messages
var ( MessageCachePolicyNone MessageCachePolicy = func(_ *Message) bool { return false } MessageCachePolicyDefault = MessageCachePolicyNone )
Default member caches policies
func MessageCachePolicyAll ¶
func MessageCachePolicyAll(policy MessageCachePolicy, policies ...MessageCachePolicy) MessageCachePolicy
MessageCachePolicyAll is a shorthand for MessageCachePolicy.And(MessageCachePolicy).And(MessageCachePolicy) etc.
func MessageCachePolicyAny ¶
func MessageCachePolicyAny(policy MessageCachePolicy, policies ...MessageCachePolicy) MessageCachePolicy
MessageCachePolicyAny is a shorthand for MessageCachePolicy.Or(MessageCachePolicy).Or(MessageCachePolicy) etc.
func MessageCachePolicyDuration ¶
func MessageCachePolicyDuration(duration time.Duration) MessageCachePolicy
MessageCachePolicyDuration creates a new MessageCachePolicy which caches messages for the give duration
func (MessageCachePolicy) And ¶
func (p MessageCachePolicy) And(policy MessageCachePolicy) MessageCachePolicy
And allows you to require both policies to be true for the member to be cached
func (MessageCachePolicy) Or ¶
func (p MessageCachePolicy) Or(policy MessageCachePolicy) MessageCachePolicy
Or allows you to combine that policy with another, meaning either needs to be true
type MessageChannel ¶
type MessageChannel interface {
discord.MessageChannel
Channel
SendTyping(opts ...rest.RequestOpt) error
GetMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
GetMessages(around discord.Snowflake, before discord.Snowflake, after discord.Snowflake, limit int, opts ...rest.RequestOpt) ([]*Message, error)
CreateMessage(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
UpdateMessage(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
DeleteMessage(messageID discord.Snowflake, opts ...rest.RequestOpt) error
BulkDeleteMessages(messageIDs []discord.Snowflake, opts ...rest.RequestOpt) error
AddReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
RemoveOwnReaction(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
RemoveUserReaction(messageID discord.Snowflake, emoji string, userID discord.Snowflake, opts ...rest.RequestOpt) error
RemoveAllReactions(messageID discord.Snowflake, opts ...rest.RequestOpt) error
RemoveAllReactionsForEmoji(messageID discord.Snowflake, emoji string, opts ...rest.RequestOpt) error
}
type MessageCommand ¶
type MessageCommand struct {
discord.MessageCommand
Bot *Bot
}
func (*MessageCommand) Delete ¶
func (c *MessageCommand) Delete(opts ...rest.RequestOpt) error
Delete deletes the ApplicationCommand from discord
func (*MessageCommand) GetPermissions ¶
func (c *MessageCommand) GetPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
GetPermissions fetched the ApplicationCommandPermissions for a specific Guild from discord
func (*MessageCommand) Guild ¶
func (c *MessageCommand) Guild() *Guild
Guild returns the Guild the ApplicationCommand is from the Caches or nil if it is a global ApplicationCommand
func (*MessageCommand) IsGlobal ¶
func (c *MessageCommand) IsGlobal() bool
IsGlobal returns true if this is a global ApplicationCommand and false for a guild ApplicationCommand
func (*MessageCommand) SetPermissions ¶
func (c *MessageCommand) SetPermissions(guildID discord.Snowflake, commandPermissions []discord.ApplicationCommandPermission, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
SetPermissions sets the ApplicationCommandPermissions for a specific Guild. this overrides all existing ApplicationCommandPermission(s). thx discord for that
func (*MessageCommand) ToCreate ¶
func (c *MessageCommand) ToCreate() discord.MessageCommandCreate
ToCreate return the ApplicationCommandCreate for this ApplicationCommand
func (*MessageCommand) Update ¶
func (c *MessageCommand) Update(commandUpdate discord.MessageCommandUpdate, opts ...rest.RequestOpt) (*MessageCommand, error)
Update updates the current ApplicationCommand with the given discord.ApplicationCommandUpdate
type MessageCommandInteraction ¶
type MessageCommandInteraction struct {
discord.MessageCommandInteraction
*InteractionFields
Data MessageCommandInteractionData
}
func (*MessageCommandInteraction) Create ¶
func (i *MessageCommandInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*MessageCommandInteraction) CreateFollowup ¶
func (i *MessageCommandInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*MessageCommandInteraction) DeferCreate ¶
func (i *MessageCommandInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
func (*MessageCommandInteraction) DeleteFollowup ¶
func (i *MessageCommandInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*MessageCommandInteraction) DeleteOriginal ¶
func (i *MessageCommandInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
func (*MessageCommandInteraction) GetFollowup ¶
func (i *MessageCommandInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*MessageCommandInteraction) GetOriginal ¶
func (i *MessageCommandInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
func (*MessageCommandInteraction) Respond ¶
func (i *MessageCommandInteraction) Respond(callbackType discord.InteractionCallbackType, callbackData discord.InteractionCallbackData, opts ...rest.RequestOpt) error
func (*MessageCommandInteraction) TargetMessage ¶
func (i *MessageCommandInteraction) TargetMessage() *Message
func (*MessageCommandInteraction) UpdateFollowup ¶
func (i *MessageCommandInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*MessageCommandInteraction) UpdateOriginal ¶
func (i *MessageCommandInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
type MessageCommandInteractionData ¶
type MessageCommandInteractionData struct {
discord.MessageCommandInteractionData
Resolved *MessageCommandResolved
}
type MessageCommandInteractionFilter ¶
type MessageCommandInteractionFilter func(messageCommandInteraction *MessageCommandInteraction) bool
type MessageCommandResolved ¶
type MessageFilter ¶
MessageFilter used to filter Message(s) in a collectors.MessageCollector
type MessageFindFunc ¶
type MessageReactionAdd ¶
type MessageReactionAddFilter ¶
type MessageReactionAddFilter func(e *MessageReactionAdd) bool
MessageReactionAddFilter used to filter MessageReactionAddEvent in a collectors.MessageReactionAddCollector
type MessageReactionRemove ¶
type MessageReactionRemoveFilter ¶
type MessageReactionRemoveFilter func(e *MessageReactionRemove) bool
MessageReactionRemoveFilter used to filter MessageReactionRemoveEvent in a collectors.MessageReactionRemoveCollector
type MessageSticker ¶
type MessageSticker struct {
discord.MessageSticker
Bot *Bot
}
func (*MessageSticker) GetSticker ¶
func (s *MessageSticker) GetSticker() (*Sticker, error)
func (*MessageSticker) URL ¶
func (s *MessageSticker) URL(size int) string
type Presence ¶
func (*Presence) Guild ¶
Guild returns the Guild this Presence belongs to. This will only check cached guilds!
type PresenceCache ¶
type PresenceCache interface {
Get(guildID discord.Snowflake, userID discord.Snowflake) *Presence
GetCopy(guildID discord.Snowflake, userID discord.Snowflake) *Presence
Set(presence *Presence) *Presence
Remove(guildID discord.Snowflake, userID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*Presence
All() map[discord.Snowflake][]*Presence
GuildCache(guildID discord.Snowflake) map[discord.Snowflake]*Presence
GuildAll(guildID discord.Snowflake) []*Presence
FindFirst(presenceFindFunc PresenceFindFunc) *Presence
FindAll(presenceFindFunc PresenceFindFunc) []*Presence
}
func NewPresenceCache ¶
func NewPresenceCache(cacheFlags CacheFlags) PresenceCache
type PresenceFindFunc ¶
type Role ¶
func (*Role) Guild ¶
Guild returns the Guild this Role belongs to. This will only check cached guilds!
func (*Role) SetPosition ¶
func (r *Role) SetPosition(rolePositionUpdate discord.RolePositionUpdate, opts ...rest.RequestOpt) ([]*Role, error)
SetPosition sets the position of this Role
func (*Role) Update ¶
func (r *Role) Update(roleUpdate discord.RoleUpdate, opts ...rest.RequestOpt) (*Role, error)
Update updates this Role with the properties provided in discord.RoleUpdate
type RoleCache ¶
type RoleCache interface {
Get(guildID discord.Snowflake, roleID discord.Snowflake) *Role
GetCopy(guildID discord.Snowflake, roleID discord.Snowflake) *Role
Set(role *Role) *Role
Remove(guildID discord.Snowflake, roleID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*Role
All() map[discord.Snowflake][]*Role
GuildCache(guildID discord.Snowflake) map[discord.Snowflake]*Role
GuildAll(guildID discord.Snowflake) []*Role
FindFirst(roleFindFunc RoleFindFunc) *Role
FindAll(roleFindFunc RoleFindFunc) []*Role
}
func NewRoleCache ¶
func NewRoleCache(cacheFlags CacheFlags) RoleCache
type RoleFindFunc ¶
type SelectMenuInteraction ¶
type SelectMenuInteraction struct {
discord.SelectMenuInteraction
*InteractionFields
Message *Message
}
func (*SelectMenuInteraction) Create ¶
func (i *SelectMenuInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*SelectMenuInteraction) CreateFollowup ¶
func (i *SelectMenuInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*SelectMenuInteraction) DeferCreate ¶
func (i *SelectMenuInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
func (*SelectMenuInteraction) DeferUpdate ¶
func (i *SelectMenuInteraction) DeferUpdate(opts ...rest.RequestOpt) error
func (*SelectMenuInteraction) DeleteFollowup ¶
func (i *SelectMenuInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*SelectMenuInteraction) DeleteOriginal ¶
func (i *SelectMenuInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
func (*SelectMenuInteraction) GetFollowup ¶
func (i *SelectMenuInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*SelectMenuInteraction) GetOriginal ¶
func (i *SelectMenuInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
func (*SelectMenuInteraction) Respond ¶
func (i *SelectMenuInteraction) Respond(callbackType discord.InteractionCallbackType, callbackData discord.InteractionCallbackData, opts ...rest.RequestOpt) error
func (*SelectMenuInteraction) SelectMenuComponent ¶
func (i *SelectMenuInteraction) SelectMenuComponent() discord.SelectMenuComponent
SelectMenuComponent returns the SelectMenuComponent which issued this SelectMenuInteraction
func (*SelectMenuInteraction) SelectedOptions ¶
func (i *SelectMenuInteraction) SelectedOptions() []discord.SelectMenuOption
SelectedOptions returns the selected SelectMenuOption(s)
func (*SelectMenuInteraction) Update ¶
func (i *SelectMenuInteraction) Update(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) error
func (*SelectMenuInteraction) UpdateFollowup ¶
func (i *SelectMenuInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*SelectMenuInteraction) UpdateOriginal ¶
func (i *SelectMenuInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*SelectMenuInteraction) UpdateSelectMenu ¶
func (i *SelectMenuInteraction) UpdateSelectMenu(selectMenu discord.SelectMenuComponent, opts ...rest.RequestOpt) error
UpdateSelectMenu updates the used SelectMenuComponent with a new SelectMenuComponent
type SelectMenuInteractionFilter ¶
type SelectMenuInteractionFilter func(selectMenuInteraction *SelectMenuInteraction) bool
SelectMenuInteractionFilter used to filter SelectMenuInteraction(s) in a collectors.SelectMenuSubmitCollector
type SelfUser ¶
type SelfUser struct {
discord.OAuth2User
Bot *Bot
User *User
}
func (*SelfUser) OpenDMChannel ¶
func (u *SelfUser) OpenDMChannel(_ ...rest.RequestOpt) (*Channel, error)
OpenDMChannel creates a Channel between the user and the Bot
func (*SelfUser) Update ¶
func (u *SelfUser) Update(updateSelfUser discord.SelfUserUpdate, opts ...rest.RequestOpt) (*SelfUser, error)
Update updates the SelfUser with the properties provided in discord.SelfUserUpdate
type SlashCommand ¶
type SlashCommand struct {
discord.SlashCommand
Bot *Bot
}
func (*SlashCommand) Delete ¶
func (c *SlashCommand) Delete(opts ...rest.RequestOpt) error
Delete deletes the ApplicationCommand from discord
func (*SlashCommand) GetPermissions ¶
func (c *SlashCommand) GetPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
GetPermissions fetched the ApplicationCommandPermissions for a specific Guild from discord
func (*SlashCommand) Guild ¶
func (c *SlashCommand) Guild() *Guild
Guild returns the Guild the ApplicationCommand is from the Caches or nil if it is a global ApplicationCommand
func (*SlashCommand) IsGlobal ¶
func (c *SlashCommand) IsGlobal() bool
IsGlobal returns true if this is a global ApplicationCommand and false for a guild ApplicationCommand
func (*SlashCommand) SetPermissions ¶
func (c *SlashCommand) SetPermissions(guildID discord.Snowflake, commandPermissions []discord.ApplicationCommandPermission, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
SetPermissions sets the ApplicationCommandPermissions for a specific Guild. this overrides all existing ApplicationCommandPermission(s). thx discord for that
func (*SlashCommand) ToCreate ¶
func (c *SlashCommand) ToCreate() discord.SlashCommandCreate
ToCreate return the ApplicationCommandCreate for this ApplicationCommand
func (*SlashCommand) Update ¶
func (c *SlashCommand) Update(commandUpdate discord.SlashCommandUpdate, opts ...rest.RequestOpt) (*SlashCommand, error)
Update updates the current ApplicationCommand with the given fields
type SlashCommandInteraction ¶
type SlashCommandInteraction struct {
discord.SlashCommandInteraction
*InteractionFields
Data SlashCommandInteractionData
}
func (*SlashCommandInteraction) Channel ¶
func (i *SlashCommandInteraction) Channel() Channel
Channel returns the Channel from the Caches
func (*SlashCommandInteraction) CommandPath ¶
func (i *SlashCommandInteraction) CommandPath() string
CommandPath returns the ApplicationCommand path
func (*SlashCommandInteraction) Create ¶
func (i *SlashCommandInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*SlashCommandInteraction) CreateFollowup ¶
func (i *SlashCommandInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*SlashCommandInteraction) DeferCreate ¶
func (i *SlashCommandInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
func (*SlashCommandInteraction) DeleteFollowup ¶
func (i *SlashCommandInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*SlashCommandInteraction) DeleteOriginal ¶
func (i *SlashCommandInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
func (*SlashCommandInteraction) GetFollowup ¶
func (i *SlashCommandInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*SlashCommandInteraction) GetOriginal ¶
func (i *SlashCommandInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
func (*SlashCommandInteraction) Guild ¶
func (i *SlashCommandInteraction) Guild() *Guild
Guild returns the Guild from the Caches
func (*SlashCommandInteraction) Respond ¶
func (i *SlashCommandInteraction) Respond(callbackType discord.InteractionCallbackType, callbackData discord.InteractionCallbackData, opts ...rest.RequestOpt) error
func (*SlashCommandInteraction) UpdateFollowup ¶
func (i *SlashCommandInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*SlashCommandInteraction) UpdateOriginal ¶
func (i *SlashCommandInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
type SlashCommandInteractionData ¶
type SlashCommandInteractionData struct {
discord.SlashCommandInteractionData
SubCommandName *string
SubCommandGroupName *string
Resolved *SlashCommandResolved
Options SlashCommandOptionsMap
}
type SlashCommandInteractionFilter ¶
type SlashCommandInteractionFilter func(slashCommandInteraction *SlashCommandInteraction) bool
type SlashCommandOption ¶
type SlashCommandOption interface {
discord.SlashCommandOption
}
type SlashCommandOptionBool ¶
type SlashCommandOptionBool struct {
discord.SlashCommandOptionBool
}
type SlashCommandOptionChannel ¶
type SlashCommandOptionChannel struct {
discord.SlashCommandOptionChannel
Resolved *SlashCommandResolved
}
func (SlashCommandOptionChannel) Channel ¶
func (o SlashCommandOptionChannel) Channel() Channel
type SlashCommandOptionFloat ¶
type SlashCommandOptionFloat struct {
discord.SlashCommandOptionFloat
}
type SlashCommandOptionInt ¶
type SlashCommandOptionInt struct {
discord.SlashCommandOptionInt
}
type SlashCommandOptionMentionable ¶
type SlashCommandOptionMentionable struct {
discord.SlashCommandOptionMentionable
Resolved *SlashCommandResolved
}
func (SlashCommandOptionMentionable) Member ¶
func (o SlashCommandOptionMentionable) Member() *Member
func (SlashCommandOptionMentionable) Role ¶
func (o SlashCommandOptionMentionable) Role() *Role
func (SlashCommandOptionMentionable) User ¶
func (o SlashCommandOptionMentionable) User() *User
type SlashCommandOptionRole ¶
type SlashCommandOptionRole struct {
discord.SlashCommandOptionRole
Resolved *SlashCommandResolved
}
func (SlashCommandOptionRole) Role ¶
func (o SlashCommandOptionRole) Role() *Role
type SlashCommandOptionString ¶
type SlashCommandOptionString struct {
discord.SlashCommandOptionString
Resolved *SlashCommandResolved
}
func (*SlashCommandOptionString) MentionedChannels ¶ added in v0.6.6
func (o *SlashCommandOptionString) MentionedChannels() []Channel
func (*SlashCommandOptionString) MentionedMembers ¶ added in v0.6.6
func (o *SlashCommandOptionString) MentionedMembers() []*Member
func (*SlashCommandOptionString) MentionedRoles ¶ added in v0.6.6
func (o *SlashCommandOptionString) MentionedRoles() []*Role
func (*SlashCommandOptionString) MentionedUsers ¶ added in v0.6.6
func (o *SlashCommandOptionString) MentionedUsers() []*User
type SlashCommandOptionSubCommand ¶
type SlashCommandOptionSubCommand struct {
discord.SlashCommandOptionSubCommand
Options []SlashCommandOption
}
type SlashCommandOptionSubCommandGroup ¶
type SlashCommandOptionSubCommandGroup struct {
discord.SlashCommandOptionSubCommandGroup
Options []SlashCommandOptionSubCommand
}
type SlashCommandOptionUser ¶
type SlashCommandOptionUser struct {
discord.SlashCommandOptionUser
Resolved *SlashCommandResolved
}
func (SlashCommandOptionUser) Member ¶
func (o SlashCommandOptionUser) Member() *Member
func (SlashCommandOptionUser) User ¶
func (o SlashCommandOptionUser) User() *User
type SlashCommandOptionsMap ¶
type SlashCommandOptionsMap map[string]SlashCommandOption
func (SlashCommandOptionsMap) Bool ¶
func (m SlashCommandOptionsMap) Bool(name string) *bool
func (SlashCommandOptionsMap) BoolOption ¶
func (m SlashCommandOptionsMap) BoolOption(name string) *SlashCommandOptionBool
func (SlashCommandOptionsMap) Channel ¶
func (m SlashCommandOptionsMap) Channel(name string) Channel
func (SlashCommandOptionsMap) ChannelOption ¶
func (m SlashCommandOptionsMap) ChannelOption(name string) *SlashCommandOptionChannel
func (SlashCommandOptionsMap) Find ¶
func (m SlashCommandOptionsMap) Find(optionFindFunc func(option SlashCommandOption) bool) SlashCommandOption
func (SlashCommandOptionsMap) FindAll ¶
func (m SlashCommandOptionsMap) FindAll(optionFindFunc func(option SlashCommandOption) bool) []SlashCommandOption
func (SlashCommandOptionsMap) Float ¶
func (m SlashCommandOptionsMap) Float(name string) *float64
func (SlashCommandOptionsMap) FloatOption ¶
func (m SlashCommandOptionsMap) FloatOption(name string) *SlashCommandOptionFloat
func (SlashCommandOptionsMap) Get ¶
func (m SlashCommandOptionsMap) Get(name string) SlashCommandOption
func (SlashCommandOptionsMap) GetAll ¶
func (m SlashCommandOptionsMap) GetAll() []SlashCommandOption
func (SlashCommandOptionsMap) GetByType ¶
func (m SlashCommandOptionsMap) GetByType(optionType discord.ApplicationCommandOptionType) []SlashCommandOption
func (SlashCommandOptionsMap) Int ¶
func (m SlashCommandOptionsMap) Int(name string) *int
func (SlashCommandOptionsMap) IntOption ¶
func (m SlashCommandOptionsMap) IntOption(name string) *SlashCommandOptionInt
func (SlashCommandOptionsMap) Member ¶
func (m SlashCommandOptionsMap) Member(name string) *Member
func (SlashCommandOptionsMap) MentionableOption ¶
func (m SlashCommandOptionsMap) MentionableOption(name string) *SlashCommandOptionMentionable
func (SlashCommandOptionsMap) Role ¶
func (m SlashCommandOptionsMap) Role(name string) *Role
func (SlashCommandOptionsMap) RoleOption ¶
func (m SlashCommandOptionsMap) RoleOption(name string) *SlashCommandOptionRole
func (SlashCommandOptionsMap) Snowflake ¶
func (m SlashCommandOptionsMap) Snowflake(name string) *discord.Snowflake
func (SlashCommandOptionsMap) String ¶
func (m SlashCommandOptionsMap) String(name string) *string
func (SlashCommandOptionsMap) StringOption ¶
func (m SlashCommandOptionsMap) StringOption(name string) *SlashCommandOptionString
func (SlashCommandOptionsMap) User ¶
func (m SlashCommandOptionsMap) User(name string) *User
func (SlashCommandOptionsMap) UserOption ¶
func (m SlashCommandOptionsMap) UserOption(name string) *SlashCommandOptionUser
type SlashCommandResolved ¶
type SlashCommandResolved struct {
Users map[discord.Snowflake]*User
Members map[discord.Snowflake]*Member
Roles map[discord.Snowflake]*Role
Channels map[discord.Snowflake]Channel
}
SlashCommandResolved contains resolved mention data for SlashCommand(s)
type StageInstance ¶
type StageInstance struct {
discord.StageInstance
Bot *Bot
}
func (*StageInstance) Channel ¶
func (i *StageInstance) Channel() *GuildStageVoiceChannel
Channel returns the Channel this StageInstance belongs to.
func (*StageInstance) Delete ¶
func (i *StageInstance) Delete(opts ...rest.RequestOpt) error
Delete deletes this StageInstance
func (*StageInstance) GetListeners ¶
func (i *StageInstance) GetListeners() []*Member
GetListeners returns the Member(s) that cannot speak in this StageInstance
func (*StageInstance) GetSpeakers ¶
func (i *StageInstance) GetSpeakers() []*Member
GetSpeakers returns the Member(s) that can speak in this StageInstance
func (*StageInstance) Guild ¶
func (i *StageInstance) Guild() *Guild
Guild returns the Guild this StageInstance belongs to. This will only check cached guilds!
func (*StageInstance) Update ¶
func (i *StageInstance) Update(stageInstanceUpdate discord.StageInstanceUpdate, opts ...rest.RequestOpt) (*StageInstance, error)
type StageInstanceCache ¶
type StageInstanceCache interface {
Get(stageInstanceID discord.Snowflake) *StageInstance
GetCopy(stageInstanceID discord.Snowflake) *StageInstance
Set(stageInstance *StageInstance) *StageInstance
Remove(stageInstanceID discord.Snowflake)
Cache() map[discord.Snowflake]*StageInstance
All() []*StageInstance
FindFirst(stageInstanceFindFunc StageInstanceFindFunc) *StageInstance
FindAll(stageInstanceFindFunc StageInstanceFindFunc) []*StageInstance
}
func NewStageInstanceCache ¶
func NewStageInstanceCache(cacheFlags CacheFlags) StageInstanceCache
type StageInstanceFindFunc ¶
type StageInstanceFindFunc func(stageInstance *StageInstance) bool
type Sticker ¶
func (*Sticker) Delete ¶
func (s *Sticker) Delete(opts ...rest.RequestOpt) error
Delete deletes this Sticker
func (*Sticker) Guild ¶
Guild returns the Guild this Sticker was created for or nil if this isn't a Guild-specific Sticker. This will only check cached guilds!
func (*Sticker) Update ¶
func (s *Sticker) Update(stickerUpdate discord.StickerUpdate, opts ...rest.RequestOpt) (*Sticker, error)
Update updates this Sticker with the properties provided in discord.StickerUpdate
type StickerCache ¶
type StickerCache interface {
Get(guildID discord.Snowflake, stickerID discord.Snowflake) *Sticker
GetCopy(guildID discord.Snowflake, stickerID discord.Snowflake) *Sticker
Set(sticker *Sticker) *Sticker
Remove(guildID discord.Snowflake, stickerID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*Sticker
All() map[discord.Snowflake][]*Sticker
GuildCache(guildID discord.Snowflake) map[discord.Snowflake]*Sticker
GuildAll(guildID discord.Snowflake) []*Sticker
FindFirst(stickerFindFunc StickerFindFunc) *Sticker
FindAll(stickerFindFunc StickerFindFunc) []*Sticker
}
func NewStickerCache ¶
func NewStickerCache(cacheFlags CacheFlags) StickerCache
type StickerFindFunc ¶
type StickerPack ¶
type StickerPack struct {
discord.StickerPack
Bot *Bot
Stickers []*Sticker
}
func (*StickerPack) BannerAsset ¶
func (p *StickerPack) BannerAsset(size int) string
func (*StickerPack) CoverSticker ¶
func (p *StickerPack) CoverSticker() *Sticker
type ThreadMember ¶
type ThreadMember struct {
discord.ThreadMember
Bot *Bot
}
type ThreadMemberCache ¶
type ThreadMemberCache interface {
Get(threadID discord.Snowflake, userID discord.Snowflake) *ThreadMember
GetCopy(threadID discord.Snowflake, userID discord.Snowflake) *ThreadMember
Set(threadMember *ThreadMember) *ThreadMember
Remove(threadID discord.Snowflake, userID discord.Snowflake)
RemoveAll(threadID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*ThreadMember
All() map[discord.Snowflake][]*ThreadMember
ThreadCache(threadID discord.Snowflake) map[discord.Snowflake]*ThreadMember
ThreadAll(threadID discord.Snowflake) []*ThreadMember
FindFirst(threadMemberFindFunc ThreadMemberFindFunc) *ThreadMember
FindAll(threadMemberFindFunc ThreadMemberFindFunc) []*ThreadMember
}
func NewThreadMemberCache ¶
func NewThreadMemberCache(cacheFlags CacheFlags) ThreadMemberCache
type ThreadMemberFindFunc ¶
type ThreadMemberFindFunc func(threadMember *ThreadMember) bool
type TwitchIntegration ¶
type TwitchIntegration struct {
discord.TwitchIntegration
Bot *Bot
GuildID discord.Snowflake
User *User
}
func (*TwitchIntegration) Delete ¶
func (i *TwitchIntegration) Delete(opts ...rest.RequestOpt) error
Delete deletes the Integration from the Guild
func (*TwitchIntegration) Guild ¶
func (i *TwitchIntegration) Guild() *Guild
Guild returns the Guild the Integration belongs to
func (*TwitchIntegration) Role ¶
func (i *TwitchIntegration) Role() *Role
Role returns the Subscriber Role the Integration uses
type User ¶
func (*User) DefaultAvatarURL ¶
DefaultAvatarURL returns the default avatar URL of this User
func (*User) EffectiveAvatarURL ¶
EffectiveAvatarURL returns either this User avatar or default avatar depending on if this User has one
func (*User) OpenDMChannel ¶
func (u *User) OpenDMChannel(opts ...rest.RequestOpt) (*DMChannel, error)
OpenDMChannel creates a DMChannel between this User and the Bot
type UserCache ¶
type UserCache interface {
Get(userID discord.Snowflake) *User
GetCopy(userID discord.Snowflake) *User
Set(user *User) *User
Remove(userID discord.Snowflake)
Cache() map[discord.Snowflake]*User
All() []*User
FindFirst(userFindFunc UserFindFunc) *User
FindAll(userFindFunc UserFindFunc) []*User
}
func NewUserCache ¶
func NewUserCache(cacheFlags CacheFlags) UserCache
type UserCommand ¶
type UserCommand struct {
discord.UserCommand
Bot *Bot
}
func (*UserCommand) Delete ¶
func (c *UserCommand) Delete(opts ...rest.RequestOpt) error
Delete deletes the ApplicationCommand from discord
func (*UserCommand) GetPermissions ¶
func (c *UserCommand) GetPermissions(guildID discord.Snowflake, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
GetPermissions fetched the ApplicationCommandPermissions for a specific Guild from discord
func (*UserCommand) Guild ¶
func (c *UserCommand) Guild() *Guild
Guild returns the Guild the ApplicationCommand is from the Caches or nil if it is a global ApplicationCommand
func (*UserCommand) IsGlobal ¶
func (c *UserCommand) IsGlobal() bool
IsGlobal returns true if this is a global ApplicationCommand and false for a guild ApplicationCommand
func (*UserCommand) SetPermissions ¶
func (c *UserCommand) SetPermissions(guildID discord.Snowflake, commandPermissions []discord.ApplicationCommandPermission, opts ...rest.RequestOpt) (*ApplicationCommandPermissions, error)
SetPermissions sets the ApplicationCommandPermissions for a specific Guild. this overrides all existing ApplicationCommandPermission(s). thx discord for that
func (*UserCommand) ToCreate ¶
func (c *UserCommand) ToCreate() discord.UserCommandCreate
ToCreate return the ApplicationCommandCreate for this ApplicationCommand
func (*UserCommand) Update ¶
func (c *UserCommand) Update(commandUpdate discord.UserCommandUpdate, opts ...rest.RequestOpt) (*UserCommand, error)
Update updates the current ApplicationCommand with the given fields
type UserCommandInteraction ¶
type UserCommandInteraction struct {
discord.UserCommandInteraction
*InteractionFields
Data UserCommandInteractionData
}
func (*UserCommandInteraction) Create ¶
func (i *UserCommandInteraction) Create(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) error
func (*UserCommandInteraction) CreateFollowup ¶
func (i *UserCommandInteraction) CreateFollowup(messageCreate discord.MessageCreate, opts ...rest.RequestOpt) (*Message, error)
func (*UserCommandInteraction) DeferCreate ¶
func (i *UserCommandInteraction) DeferCreate(ephemeral bool, opts ...rest.RequestOpt) error
func (*UserCommandInteraction) DeleteFollowup ¶
func (i *UserCommandInteraction) DeleteFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) error
func (*UserCommandInteraction) DeleteOriginal ¶
func (i *UserCommandInteraction) DeleteOriginal(opts ...rest.RequestOpt) error
func (*UserCommandInteraction) GetFollowup ¶
func (i *UserCommandInteraction) GetFollowup(messageID discord.Snowflake, opts ...rest.RequestOpt) (*Message, error)
func (*UserCommandInteraction) GetOriginal ¶
func (i *UserCommandInteraction) GetOriginal(opts ...rest.RequestOpt) (*Message, error)
func (*UserCommandInteraction) Respond ¶
func (i *UserCommandInteraction) Respond(callbackType discord.InteractionCallbackType, callbackData discord.InteractionCallbackData, opts ...rest.RequestOpt) error
func (*UserCommandInteraction) TargetMember ¶
func (i *UserCommandInteraction) TargetMember() *Member
func (*UserCommandInteraction) TargetUser ¶
func (i *UserCommandInteraction) TargetUser() *User
func (*UserCommandInteraction) UpdateFollowup ¶
func (i *UserCommandInteraction) UpdateFollowup(messageID discord.Snowflake, messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
func (*UserCommandInteraction) UpdateOriginal ¶
func (i *UserCommandInteraction) UpdateOriginal(messageUpdate discord.MessageUpdate, opts ...rest.RequestOpt) (*Message, error)
type UserCommandInteractionData ¶
type UserCommandInteractionData struct {
discord.UserCommandInteractionData
Resolved *UserCommandResolved
}
type UserCommandInteractionFilter ¶
type UserCommandInteractionFilter func(userCommandInteraction *UserCommandInteraction) bool
type UserCommandResolved ¶
type UserFindFunc ¶
type VoiceState ¶
type VoiceState struct {
discord.VoiceState
Bot *Bot
Member *Member
}
func (*VoiceState) Channel ¶
func (s *VoiceState) Channel() Channel
Channel returns the Channel of this VoiceState from the Caches
func (*VoiceState) Deaf ¶
func (s *VoiceState) Deaf() bool
Deaf returns whether the Member is deafened
func (*VoiceState) Guild ¶
func (s *VoiceState) Guild() *Guild
Guild returns the Guild of this VoiceState. This will only check cached guilds!
func (*VoiceState) Update ¶
func (s *VoiceState) Update(suppress *bool, requestToSpeak *discord.NullTime, opts ...rest.RequestOpt) error
func (*VoiceState) UpdateVoiceState ¶
func (s *VoiceState) UpdateVoiceState(suppress *bool, requestToSpeak *discord.NullTime, opts ...rest.RequestOpt) error
type VoiceStateCache ¶
type VoiceStateCache interface {
Get(guildID discord.Snowflake, userID discord.Snowflake) *VoiceState
GetCopy(guildID discord.Snowflake, userID discord.Snowflake) *VoiceState
Set(voiceState *VoiceState) *VoiceState
Remove(guildID discord.Snowflake, userID discord.Snowflake)
Cache() map[discord.Snowflake]map[discord.Snowflake]*VoiceState
All() map[discord.Snowflake][]*VoiceState
GuildCache(guildID discord.Snowflake) map[discord.Snowflake]*VoiceState
GuildAll(guildID discord.Snowflake) []*VoiceState
FindFirst(voiceStateFindFunc VoiceStateFindFunc) *VoiceState
FindAll(voiceStateFindFunc VoiceStateFindFunc) []*VoiceState
}
func NewVoiceStateCache ¶
func NewVoiceStateCache(cacheFlags CacheFlags) VoiceStateCache
type VoiceStateFindFunc ¶
type VoiceStateFindFunc func(voiceState *VoiceState) bool
type YouTubeIntegration ¶
type YouTubeIntegration struct {
discord.YouTubeIntegration
Bot *Bot
GuildID discord.Snowflake
User *User
}
func (*YouTubeIntegration) Delete ¶
func (i *YouTubeIntegration) Delete(opts ...rest.RequestOpt) error
Delete deletes the Integration from the Guild
func (*YouTubeIntegration) Guild ¶
func (i *YouTubeIntegration) Guild() *Guild
Guild returns the Guild the Integration belongs to
func (*YouTubeIntegration) Role ¶
func (i *YouTubeIntegration) Role() *Role
Role returns the Subscriber Role the Integration uses
Source Files
¶
- application_command.go
- application_command_permissions.go
- audio_controller.go
- audit_log.go
- autocomplete_interaction.go
- ban.go
- bot.go
- button_interaction.go
- cache_channel.go
- cache_config.go
- cache_emoji.go
- cache_flags.go
- cache_guild.go
- cache_guild_scheduled_events.go
- cache_member.go
- cache_message.go
- cache_presence.go
- cache_role.go
- cache_stage_instance.go
- cache_sticker.go
- cache_thread_member.go
- cache_voice_state.go
- caches.go
- channel.go
- collectors.go
- emoji.go
- entity_builder.go
- event_manager.go
- guild.go
- guild_scheduled_event.go
- guild_template.go
- integration.go
- interaction.go
- invite.go
- member.go
- member_cache_policy.go
- member_chunking_filter.go
- member_chunking_manager.go
- mentions.go
- message.go
- message_cache_policy.go
- message_command_interaction.go
- message_sticker.go
- permission_util.go
- presence.go
- role.go
- select_menu_interaction.go
- self_user.go
- slash_command_interaction.go
- slash_command_option.go
- stage_instance.go
- sticker.go
- sticker_pack.go
- thread_member.go
- user.go
- user_cache.go
- user_command_interaction.go
- voice_state.go
- webhook.go