Documentation
¶
Index ¶
- func IDFromToken(token string) (*api.Snowflake, error)
- func New(token string, options api.Options) (api.Disgo, error)
- func NewBuilder(token string) api.DisgoBuilder
- type AudioControllerImpl
- type CacheImpl
- func (c *CacheImpl) AllCategories() []*api.Category
- func (c *CacheImpl) AllCategoryCache() map[api.Snowflake]map[api.Snowflake]*api.Category
- func (c *CacheImpl) AllEmoteCache() map[api.Snowflake]map[api.Snowflake]*api.Emoji
- func (c *CacheImpl) AllGuildCommandCache() map[api.Snowflake]map[api.Snowflake]*api.Command
- func (c *CacheImpl) AllMemberCache() map[api.Snowflake]map[api.Snowflake]*api.Member
- func (c *CacheImpl) AllMembers() []*api.Member
- func (c *CacheImpl) AllMessageCache() map[api.Snowflake]map[api.Snowflake]*api.Message
- func (c *CacheImpl) AllRoleCache() map[api.Snowflake]map[api.Snowflake]*api.Role
- func (c *CacheImpl) AllRoles() []*api.Role
- func (c *CacheImpl) AllStoreChannelCache() map[api.Snowflake]map[api.Snowflake]*api.StoreChannel
- func (c *CacheImpl) AllStoreChannels() []*api.StoreChannel
- func (c *CacheImpl) AllTextChannelCache() map[api.Snowflake]map[api.Snowflake]*api.TextChannel
- func (c *CacheImpl) AllTextChannels() []*api.TextChannel
- func (c *CacheImpl) AllVoiceChannelCache() map[api.Snowflake]map[api.Snowflake]*api.VoiceChannel
- func (c *CacheImpl) AllVoiceChannels() []*api.VoiceChannel
- func (c *CacheImpl) CacheCategory(category *api.Category) *api.Category
- func (c *CacheImpl) CacheDMChannel(dmChannel *api.DMChannel) *api.DMChannel
- func (c *CacheImpl) CacheEmote(emote *api.Emoji) *api.Emoji
- func (c CacheImpl) CacheFlags() api.CacheFlags
- func (c *CacheImpl) CacheGlobalCommand(command *api.Command) *api.Command
- func (c *CacheImpl) CacheGuild(guild *api.Guild) *api.Guild
- func (c *CacheImpl) CacheGuildCommand(command *api.Command) *api.Command
- func (c *CacheImpl) CacheMember(member *api.Member) *api.Member
- func (c *CacheImpl) CacheMessage(message *api.Message) *api.Message
- func (c *CacheImpl) CacheRole(role *api.Role) *api.Role
- func (c *CacheImpl) CacheStoreChannel(storeChannel *api.StoreChannel) *api.StoreChannel
- func (c *CacheImpl) CacheTextChannel(textChannel *api.TextChannel) *api.TextChannel
- func (c *CacheImpl) CacheUser(user *api.User) *api.User
- func (c *CacheImpl) CacheVoiceChannel(voiceChannel *api.VoiceChannel) *api.VoiceChannel
- func (c *CacheImpl) CacheVoiceState(voiceState *api.VoiceState) *api.VoiceState
- func (c *CacheImpl) Categories(guildID api.Snowflake) []*api.Category
- func (c *CacheImpl) CategoriesByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.Category
- func (c *CacheImpl) Category(categoryID api.Snowflake) *api.Category
- func (c *CacheImpl) CategoryCache(guildID api.Snowflake) map[api.Snowflake]*api.Category
- func (c *CacheImpl) Channel(channelID api.Snowflake) *api.Channel
- func (c *CacheImpl) Close()
- func (c *CacheImpl) Command(commandID api.Snowflake) *api.Command
- func (c *CacheImpl) DMChannel(dmChannelID api.Snowflake) *api.DMChannel
- func (c *CacheImpl) DMChannelCache() map[api.Snowflake]*api.DMChannel
- func (c *CacheImpl) DMChannels() []*api.DMChannel
- func (c *CacheImpl) Disgo() api.Disgo
- func (c *CacheImpl) DoCleanup()
- func (c *CacheImpl) Emote(emoteID api.Snowflake) *api.Emoji
- func (c *CacheImpl) EmoteCache(guildID api.Snowflake) map[api.Snowflake]*api.Emoji
- func (c *CacheImpl) Emotes(guildID api.Snowflake) []*api.Emoji
- func (c *CacheImpl) EmotesByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.Emoji
- func (c *CacheImpl) FindCategories(guildID api.Snowflake, check func(u *api.Category) bool) []*api.Category
- func (c *CacheImpl) FindCategory(guildID api.Snowflake, check func(u *api.Category) bool) *api.Category
- func (c *CacheImpl) FindDMChannel(check func(u *api.DMChannel) bool) *api.DMChannel
- func (c *CacheImpl) FindDMChannels(check func(u *api.DMChannel) bool) []*api.DMChannel
- func (c *CacheImpl) FindGuild(check func(g *api.Guild) bool) *api.Guild
- func (c *CacheImpl) FindGuilds(check func(g *api.Guild) bool) []*api.Guild
- func (c *CacheImpl) FindMember(guildID api.Snowflake, check func(u *api.Member) bool) *api.Member
- func (c *CacheImpl) FindMembers(guildID api.Snowflake, check func(u *api.Member) bool) []*api.Member
- func (c *CacheImpl) FindRole(guildID api.Snowflake, check func(u *api.Role) bool) *api.Role
- func (c *CacheImpl) FindRoles(guildID api.Snowflake, check func(u *api.Role) bool) []*api.Role
- func (c *CacheImpl) FindStoreChannel(guildID api.Snowflake, check func(u *api.StoreChannel) bool) *api.StoreChannel
- func (c *CacheImpl) FindStoreChannels(guildID api.Snowflake, check func(u *api.StoreChannel) bool) []*api.StoreChannel
- func (c *CacheImpl) FindTextChannel(guildID api.Snowflake, check func(u *api.TextChannel) bool) *api.TextChannel
- func (c *CacheImpl) FindTextChannels(guildID api.Snowflake, check func(u *api.TextChannel) bool) []*api.TextChannel
- func (c *CacheImpl) FindUser(check func(u *api.User) bool) *api.User
- func (c *CacheImpl) FindUsers(check func(u *api.User) bool) []*api.User
- func (c *CacheImpl) FindVoiceChannel(guildID api.Snowflake, check func(u *api.VoiceChannel) bool) *api.VoiceChannel
- func (c *CacheImpl) FindVoiceChannels(guildID api.Snowflake, check func(u *api.VoiceChannel) bool) []*api.VoiceChannel
- func (c *CacheImpl) GlobalCommandCache() map[api.Snowflake]*api.Command
- func (c *CacheImpl) Guild(guildID api.Snowflake) *api.Guild
- func (c *CacheImpl) GuildCache() map[api.Snowflake]*api.Guild
- func (c *CacheImpl) GuildChannel(channelID api.Snowflake) *api.GuildChannel
- func (c *CacheImpl) GuildCommandCache(guildID api.Snowflake) map[api.Snowflake]*api.Command
- func (c *CacheImpl) Guilds() []*api.Guild
- func (c *CacheImpl) GuildsByName(name string, ignoreCase bool) []*api.Guild
- func (c *CacheImpl) Member(guildID api.Snowflake, userID api.Snowflake) *api.Member
- func (c *CacheImpl) MemberByTag(guildID api.Snowflake, tag string) *api.Member
- func (c *CacheImpl) MemberCache(guildID api.Snowflake) map[api.Snowflake]*api.Member
- func (c *CacheImpl) Members(guildID api.Snowflake) []*api.Member
- func (c *CacheImpl) MembersByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.Member
- func (c *CacheImpl) Message(channelID api.Snowflake, messageID api.Snowflake) *api.Message
- func (c *CacheImpl) MessageCache(channelID api.Snowflake) map[api.Snowflake]*api.Message
- func (c *CacheImpl) MessageChannel(channelID api.Snowflake) *api.MessageChannel
- func (c *CacheImpl) Messages(channelID api.Snowflake) []*api.Message
- func (c *CacheImpl) Role(roleID api.Snowflake) *api.Role
- func (c *CacheImpl) RoleCache(guildID api.Snowflake) map[api.Snowflake]*api.Role
- func (c *CacheImpl) Roles(guildID api.Snowflake) []*api.Role
- func (c *CacheImpl) RolesByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.Role
- func (c *CacheImpl) StoreChannel(storeChannelID api.Snowflake) *api.StoreChannel
- func (c *CacheImpl) StoreChannelCache(guildID api.Snowflake) map[api.Snowflake]*api.StoreChannel
- func (c *CacheImpl) StoreChannels(guildID api.Snowflake) []*api.StoreChannel
- func (c *CacheImpl) StoreChannelsByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.StoreChannel
- func (c *CacheImpl) TextChannel(textChannelID api.Snowflake) *api.TextChannel
- func (c *CacheImpl) TextChannelCache(guildID api.Snowflake) map[api.Snowflake]*api.TextChannel
- func (c *CacheImpl) TextChannels(guildID api.Snowflake) []*api.TextChannel
- func (c *CacheImpl) TextChannelsByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.TextChannel
- func (c *CacheImpl) UncacheCategory(guildID api.Snowflake, categoryID api.Snowflake)
- func (c *CacheImpl) UncacheCommand(commandID api.Snowflake)
- func (c *CacheImpl) UncacheDMChannel(dmChannelID api.Snowflake)
- func (c *CacheImpl) UncacheEmote(guildID api.Snowflake, emoteID api.Snowflake)
- func (c *CacheImpl) UncacheGuild(guildID api.Snowflake)
- func (c *CacheImpl) UncacheMember(guildID api.Snowflake, userID api.Snowflake)
- func (c *CacheImpl) UncacheMessage(channelID api.Snowflake, messageID api.Snowflake)
- func (c *CacheImpl) UncacheRole(guildID api.Snowflake, roleID api.Snowflake)
- func (c *CacheImpl) UncacheStoreChannel(guildID api.Snowflake, storeChannelID api.Snowflake)
- func (c *CacheImpl) UncacheTextChannel(guildID api.Snowflake, textChannelID api.Snowflake)
- func (c *CacheImpl) UncacheUser(id api.Snowflake)
- func (c *CacheImpl) UncacheVoiceChannel(guildID api.Snowflake, voiceChannelID api.Snowflake)
- func (c *CacheImpl) UncacheVoiceState(guildID api.Snowflake, userID api.Snowflake)
- func (c *CacheImpl) User(id api.Snowflake) *api.User
- func (c *CacheImpl) UserByTag(tag string) *api.User
- func (c *CacheImpl) UserCache() map[api.Snowflake]*api.User
- func (c *CacheImpl) Users() []*api.User
- func (c *CacheImpl) UsersByName(name string, ignoreCase bool) []*api.User
- func (c *CacheImpl) VoiceChannel(voiceChannelID api.Snowflake) *api.VoiceChannel
- func (c *CacheImpl) VoiceChannelCache(guildID api.Snowflake) map[api.Snowflake]*api.VoiceChannel
- func (c *CacheImpl) VoiceChannels(guildID api.Snowflake) []*api.VoiceChannel
- func (c *CacheImpl) VoiceChannelsByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.VoiceChannel
- func (c *CacheImpl) VoiceState(guildID api.Snowflake, userID api.Snowflake) *api.VoiceState
- func (c *CacheImpl) VoiceStateCache(guildID api.Snowflake) map[api.Snowflake]*api.VoiceState
- func (c *CacheImpl) VoiceStates(guildID api.Snowflake) []*api.VoiceState
- type DisgoBuilderImpl
- func (b *DisgoBuilderImpl) AddEventListeners(eventListeners ...api.EventListener) api.DisgoBuilder
- func (b *DisgoBuilderImpl) Build() (api.Disgo, error)
- func (b *DisgoBuilderImpl) DisableCacheFlags(cacheFlags ...api.CacheFlags) api.DisgoBuilder
- func (b *DisgoBuilderImpl) EnableCacheFlags(cacheFlags ...api.CacheFlags) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetAudioController(audioController api.AudioController) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetCache(cache api.Cache) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetCacheFlags(cacheFlags ...api.CacheFlags) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetEntityBuilder(entityBuilder api.EntityBuilder) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetEventManager(eventManager api.EventManager) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetGateway(gateway api.Gateway) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetGatewayIntents(gatewayIntents ...api.GatewayIntents) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetHTTPClient(httpClient *http.Client) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetLogger(logger log.Logger) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetMemberCachePolicy(memberCachePolicy api.MemberCachePolicy) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetMessageCachePolicy(messageCachePolicy api.MessageCachePolicy) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetRawGatewayEventsEnabled(enabled bool) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetRestClient(restClient api.RestClient) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetToken(token string) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetVoiceDispatchInterceptor(voiceDispatchInterceptor api.VoiceDispatchInterceptor) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetWebhookServer(webhookServer api.WebhookServer) api.DisgoBuilder
- func (b *DisgoBuilderImpl) SetWebhookServerProperties(listenURL string, listenPort int, publicKey string) api.DisgoBuilder
- type DisgoImpl
- func (d *DisgoImpl) ApplicationID() api.Snowflake
- func (d *DisgoImpl) AudioController() api.AudioController
- func (d *DisgoImpl) Cache() api.Cache
- func (d *DisgoImpl) ClientID() api.Snowflake
- func (d *DisgoImpl) Close()
- func (d *DisgoImpl) Connect() error
- func (d *DisgoImpl) CreateCommand(command api.CommandCreate) (*api.Command, restclient.RestError)
- func (d *DisgoImpl) CreateGuildCommand(guildID api.Snowflake, command api.CommandCreate) (*api.Command, restclient.RestError)
- func (d *DisgoImpl) CreateGuildFromTemplate(templateCode string, createGuildFromTemplate api.CreateGuildFromTemplate) (*api.Guild, restclient.RestError)
- func (d *DisgoImpl) DeleteCommand(commandID api.Snowflake) restclient.RestError
- func (d *DisgoImpl) DeleteGuildCommand(guildID api.Snowflake, commandID api.Snowflake) restclient.RestError
- func (d *DisgoImpl) EditCommand(commandID api.Snowflake, command api.CommandUpdate) (*api.Command, restclient.RestError)
- func (d *DisgoImpl) EditGuildCommand(guildID api.Snowflake, commandID api.Snowflake, command api.CommandUpdate) (*api.Command, restclient.RestError)
- func (d *DisgoImpl) EntityBuilder() api.EntityBuilder
- func (d *DisgoImpl) EventManager() api.EventManager
- func (d *DisgoImpl) Gateway() api.Gateway
- func (d *DisgoImpl) GatewayIntents() api.GatewayIntents
- func (d *DisgoImpl) GetCommand(commandID api.Snowflake) (*api.Command, restclient.RestError)
- func (d *DisgoImpl) GetCommands() ([]*api.Command, restclient.RestError)
- func (d *DisgoImpl) GetGuildCommand(guildID api.Snowflake, commandID api.Snowflake) (*api.Command, restclient.RestError)
- func (d *DisgoImpl) GetGuildCommandPermissions(guildID api.Snowflake, commandID api.Snowflake) (*api.GuildCommandPermissions, restclient.RestError)
- func (d *DisgoImpl) GetGuildCommands(guildID api.Snowflake) ([]*api.Command, restclient.RestError)
- func (d *DisgoImpl) GetGuildCommandsPermissions(guildID api.Snowflake) ([]*api.GuildCommandPermissions, restclient.RestError)
- func (d *DisgoImpl) GetTemplate(code string) (*api.GuildTemplate, restclient.RestError)
- func (d *DisgoImpl) HasGateway() bool
- func (d *DisgoImpl) HeartbeatLatency() time.Duration
- func (d *DisgoImpl) LargeThreshold() int
- func (d *DisgoImpl) Logger() log.Logger
- func (d *DisgoImpl) RawGatewayEventsEnabled() bool
- func (d *DisgoImpl) RestClient() api.RestClient
- func (d *DisgoImpl) SelfUser() *api.SelfUser
- func (d *DisgoImpl) SetCommands(commands ...api.CommandCreate) ([]*api.Command, restclient.RestError)
- func (d *DisgoImpl) SetGuildCommandPermissions(guildID api.Snowflake, commandID api.Snowflake, ...) (*api.GuildCommandPermissions, restclient.RestError)
- func (d *DisgoImpl) SetGuildCommands(guildID api.Snowflake, commands ...api.CommandCreate) ([]*api.Command, restclient.RestError)
- func (d *DisgoImpl) SetGuildCommandsPermissions(guildID api.Snowflake, commandPermissions ...api.SetGuildCommandPermissions) ([]*api.GuildCommandPermissions, restclient.RestError)
- func (d *DisgoImpl) SetVoiceDispatchInterceptor(voiceDispatchInterceptor api.VoiceDispatchInterceptor)
- func (d *DisgoImpl) Start()
- func (d *DisgoImpl) Token() string
- func (d *DisgoImpl) VoiceDispatchInterceptor() api.VoiceDispatchInterceptor
- func (d *DisgoImpl) WebhookServer() api.WebhookServer
- type EntityBuilderImpl
- func (b *EntityBuilderImpl) CreateAuditLog(guildID api.Snowflake, auditLogFilterOptions api.AuditLogFilterOptions, ...) *api.AuditLog
- func (b *EntityBuilderImpl) CreateButtonInteraction(fullInteraction *api.FullInteraction, ...) *api.ButtonInteraction
- func (b *EntityBuilderImpl) CreateCategory(channel *api.Channel, updateCache api.CacheStrategy) *api.Category
- func (b *EntityBuilderImpl) CreateCommandInteraction(fullInteraction *api.FullInteraction, interaction *api.Interaction, ...) *api.CommandInteraction
- func (b *EntityBuilderImpl) CreateComponentInteraction(fullInteraction *api.FullInteraction, interaction *api.Interaction, ...) *api.ComponentInteraction
- func (b *EntityBuilderImpl) CreateDMChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.DMChannel
- func (b *EntityBuilderImpl) CreateEmoji(guildID api.Snowflake, emoji *api.Emoji, updateCache api.CacheStrategy) *api.Emoji
- func (b *EntityBuilderImpl) CreateGlobalCommand(command *api.Command, updateCache api.CacheStrategy) *api.Command
- func (b *EntityBuilderImpl) CreateGuild(fullGuild *api.FullGuild, updateCache api.CacheStrategy) *api.Guild
- func (b *EntityBuilderImpl) CreateGuildCommand(guildID api.Snowflake, command *api.Command, updateCache api.CacheStrategy) *api.Command
- func (b *EntityBuilderImpl) CreateGuildCommandPermissions(guildCommandPermissions *api.GuildCommandPermissions, ...) *api.GuildCommandPermissions
- func (b *EntityBuilderImpl) CreateGuildTemplate(guildTemplate *api.GuildTemplate, updateCache api.CacheStrategy) *api.GuildTemplate
- func (b *EntityBuilderImpl) CreateIntegration(guildID api.Snowflake, integration *api.Integration, ...) *api.Integration
- func (b EntityBuilderImpl) CreateInteraction(fullInteraction *api.FullInteraction, c chan api.InteractionResponse, ...) *api.Interaction
- func (b *EntityBuilderImpl) CreateMember(guildID api.Snowflake, member *api.Member, updateCache api.CacheStrategy) *api.Member
- func (b *EntityBuilderImpl) CreateMessage(message *api.Message, updateCache api.CacheStrategy) *api.Message
- func (b *EntityBuilderImpl) CreateRole(guildID api.Snowflake, role *api.Role, updateCache api.CacheStrategy) *api.Role
- func (b *EntityBuilderImpl) CreateSelectMenuInteraction(fullInteraction *api.FullInteraction, ...) *api.SelectMenuInteraction
- func (b *EntityBuilderImpl) CreateStoreChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.StoreChannel
- func (b *EntityBuilderImpl) CreateTextChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.TextChannel
- func (b *EntityBuilderImpl) CreateUser(user *api.User, updateCache api.CacheStrategy) *api.User
- func (b *EntityBuilderImpl) CreateVoiceChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.VoiceChannel
- func (b *EntityBuilderImpl) CreateVoiceState(guildID api.Snowflake, voiceState *api.VoiceState, ...) *api.VoiceState
- func (b *EntityBuilderImpl) Disgo() api.Disgo
- type EventManagerImpl
- func (e *EventManagerImpl) AddEventListeners(listeners ...api.EventListener)
- func (e *EventManagerImpl) Close()
- func (e *EventManagerImpl) Disgo() api.Disgo
- func (e *EventManagerImpl) Dispatch(event api.Event)
- func (e *EventManagerImpl) Handle(name api.GatewayEventType, c chan api.InteractionResponse, sequenceNumber int, ...)
- func (e *EventManagerImpl) ListenEvents()
- type GatewayImpl
- func (g *GatewayImpl) Close()
- func (g *GatewayImpl) Conn() *websocket.Conn
- func (g *GatewayImpl) Disgo() api.Disgo
- func (g *GatewayImpl) Latency() time.Duration
- func (g *GatewayImpl) Open() error
- func (g *GatewayImpl) Send(command api.GatewayCommand) error
- func (g *GatewayImpl) Status() api.GatewayStatus
- type WebhookServerImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDFromToken ¶
IDFromToken returns the applicationID from the BotToken
func NewBuilder ¶
func NewBuilder(token string) api.DisgoBuilder
NewBuilder returns a new api.DisgoBuilder instance
Types ¶
type AudioControllerImpl ¶ added in v0.2.0
type AudioControllerImpl struct {
// contains filtered or unexported fields
}
AudioControllerImpl lets you Connect / Disconnect from an api.VoiceChannel
func (*AudioControllerImpl) Connect ¶ added in v0.2.0
Connect sends an api.GatewayCommand to connect to an api.VoiceChannel
func (*AudioControllerImpl) Disconnect ¶ added in v0.2.0
func (c *AudioControllerImpl) Disconnect(guildID api.Snowflake) error
Disconnect sends an api.GatewayCommand to disconnect from an api.VoiceChannel
func (*AudioControllerImpl) Disgo ¶ added in v0.2.0
func (c *AudioControllerImpl) Disgo() api.Disgo
Disgo returns the api.Disgo instance
type CacheImpl ¶
type CacheImpl struct {
// contains filtered or unexported fields
}
CacheImpl is used for api.Disgo's api.Cache
func (*CacheImpl) AllCategories ¶
AllCategories returns all categories from cache as a slice
func (*CacheImpl) AllCategoryCache ¶
AllCategoryCache returns all categories as a map of maps
func (*CacheImpl) AllEmoteCache ¶ added in v0.2.0
AllEmoteCache returns the full emote cache
func (*CacheImpl) AllGuildCommandCache ¶ added in v0.2.0
AllGuildCommandCache returns the cache of all Guild Command(s)
func (*CacheImpl) AllMemberCache ¶
AllMemberCache returns the entire cache as a map of maps
func (*CacheImpl) AllMembers ¶
AllMembers returns the entire cache of members
func (*CacheImpl) AllMessageCache ¶ added in v0.2.0
AllMessageCache returns the entire cache of messages
func (*CacheImpl) AllRoleCache ¶
AllRoleCache returns the entire role cache
func (*CacheImpl) AllStoreChannelCache ¶
AllStoreChannelCache returns all store channels from cache as a map of maps
func (*CacheImpl) AllStoreChannels ¶
func (c *CacheImpl) AllStoreChannels() []*api.StoreChannel
AllStoreChannels returns all store channels from cache as a map
func (*CacheImpl) AllTextChannelCache ¶
AllTextChannelCache returns the text channel cache as a map of maps
func (*CacheImpl) AllTextChannels ¶
func (c *CacheImpl) AllTextChannels() []*api.TextChannel
AllTextChannels returns the text channel cache as a slice
func (*CacheImpl) AllVoiceChannelCache ¶
AllVoiceChannelCache returns all of the voice channels from cache as a map of maps
func (*CacheImpl) AllVoiceChannels ¶
func (c *CacheImpl) AllVoiceChannels() []*api.VoiceChannel
AllVoiceChannels returns all of the voice channels from cache as a slice
func (*CacheImpl) CacheCategory ¶
CacheCategory adds a category to the cache
func (*CacheImpl) CacheDMChannel ¶
CacheDMChannel adds a DM channel to the cache
func (*CacheImpl) CacheEmote ¶ added in v0.2.0
CacheEmote adds an Emote to the api.Cache if emoji caches are used
func (CacheImpl) CacheFlags ¶ added in v0.2.0
func (c CacheImpl) CacheFlags() api.CacheFlags
CacheFlags returns the current active api.CacheFlags
func (*CacheImpl) CacheGlobalCommand ¶ added in v0.2.0
CacheGlobalCommand adds a global command to the cache
func (*CacheImpl) CacheGuild ¶
CacheGuild adds a guild to the cache
func (*CacheImpl) CacheGuildCommand ¶ added in v0.2.0
CacheGuildCommand adds a Guild Command to the cache
func (*CacheImpl) CacheMember ¶
CacheMember adds a member to the cache
func (*CacheImpl) CacheMessage ¶ added in v0.2.0
CacheMessage adds a message to the cache
func (*CacheImpl) CacheStoreChannel ¶
func (c *CacheImpl) CacheStoreChannel(storeChannel *api.StoreChannel) *api.StoreChannel
CacheStoreChannel adds a store channel to the cache
func (*CacheImpl) CacheTextChannel ¶
func (c *CacheImpl) CacheTextChannel(textChannel *api.TextChannel) *api.TextChannel
CacheTextChannel adds a channel to the cache
func (*CacheImpl) CacheVoiceChannel ¶
func (c *CacheImpl) CacheVoiceChannel(voiceChannel *api.VoiceChannel) *api.VoiceChannel
CacheVoiceChannel adds a voice channel to cache
func (*CacheImpl) CacheVoiceState ¶ added in v0.2.0
func (c *CacheImpl) CacheVoiceState(voiceState *api.VoiceState) *api.VoiceState
CacheVoiceState adds an api.VoiceState from the api.Cache
func (*CacheImpl) Categories ¶
Categories returns the categories of a guild by ID
func (*CacheImpl) CategoriesByName ¶
func (c *CacheImpl) CategoriesByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.Category
CategoriesByName returns categories from cache by name
func (*CacheImpl) CategoryCache ¶
CategoryCache returns all categories from a guild's cache as a map
func (*CacheImpl) Close ¶
func (c *CacheImpl) Close()
Close cleans up the cache and it's internal tasks
func (*CacheImpl) DMChannelCache ¶
DMChannelCache returns the DM channels as a map
func (*CacheImpl) DMChannels ¶
DMChannels return all DM channels as a slice
func (*CacheImpl) DoCleanup ¶
func (c *CacheImpl) DoCleanup()
DoCleanup removes items from the cache that no longer meet their policy
func (*CacheImpl) EmoteCache ¶ added in v0.2.0
EmoteCache returns the emote cache for a specific guild
func (*CacheImpl) EmotesByName ¶ added in v0.2.0
EmotesByName returns all emotes for a guild by name
func (*CacheImpl) FindCategories ¶
func (c *CacheImpl) FindCategories(guildID api.Snowflake, check func(u *api.Category) bool) []*api.Category
FindCategories finds categories in a guild by custom method
func (*CacheImpl) FindCategory ¶
func (c *CacheImpl) FindCategory(guildID api.Snowflake, check func(u *api.Category) bool) *api.Category
FindCategory finds a category in a guild by custom method
func (*CacheImpl) FindDMChannel ¶
FindDMChannel finds a DM channel in cache with a custom method
func (*CacheImpl) FindDMChannels ¶
FindDMChannels finds DM Channels in cache with a custom method
func (*CacheImpl) FindGuilds ¶
FindGuilds finds multiple guilds with a custom method
func (*CacheImpl) FindMember ¶
FindMember allows you to find a member in a guild by custom method
func (*CacheImpl) FindMembers ¶
func (c *CacheImpl) FindMembers(guildID api.Snowflake, check func(u *api.Member) bool) []*api.Member
FindMembers allows you to find api.Member(s) in a guild by custom method
func (*CacheImpl) FindStoreChannel ¶
func (c *CacheImpl) FindStoreChannel(guildID api.Snowflake, check func(u *api.StoreChannel) bool) *api.StoreChannel
FindStoreChannel returns a store channel from cache by custom method
func (*CacheImpl) FindStoreChannels ¶
func (c *CacheImpl) FindStoreChannels(guildID api.Snowflake, check func(u *api.StoreChannel) bool) []*api.StoreChannel
FindStoreChannels returns store channels from cache by custom method
func (*CacheImpl) FindTextChannel ¶
func (c *CacheImpl) FindTextChannel(guildID api.Snowflake, check func(u *api.TextChannel) bool) *api.TextChannel
FindTextChannel finds a text channel in a guild by custom method
func (*CacheImpl) FindTextChannels ¶
func (c *CacheImpl) FindTextChannels(guildID api.Snowflake, check func(u *api.TextChannel) bool) []*api.TextChannel
FindTextChannels finds text channels in a guild by custom method
func (*CacheImpl) FindVoiceChannel ¶
func (c *CacheImpl) FindVoiceChannel(guildID api.Snowflake, check func(u *api.VoiceChannel) bool) *api.VoiceChannel
FindVoiceChannel returns a voice channel from cache by custom method
func (*CacheImpl) FindVoiceChannels ¶
func (c *CacheImpl) FindVoiceChannels(guildID api.Snowflake, check func(u *api.VoiceChannel) bool) []*api.VoiceChannel
FindVoiceChannels returns voice channels from cache by custom method
func (*CacheImpl) GlobalCommandCache ¶ added in v0.2.0
GlobalCommandCache returns the cache of global Command(s)
func (*CacheImpl) GuildCache ¶
GuildCache returns the guild cache as a map
func (*CacheImpl) GuildChannel ¶
func (c *CacheImpl) GuildChannel(channelID api.Snowflake) *api.GuildChannel
GuildChannel returns a channel from a guild by ID
func (*CacheImpl) GuildCommandCache ¶ added in v0.2.0
GuildCommandCache returns the cache of commands in a Guild
func (*CacheImpl) GuildsByName ¶
GuildsByName allows you to get guilds from the cache by name
func (*CacheImpl) MemberByTag ¶
MemberByTag returns a member from cache by guild ID and user tag
func (*CacheImpl) MemberCache ¶
MemberCache returns the cache of a guild as a map
func (*CacheImpl) MembersByName ¶
func (c *CacheImpl) MembersByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.Member
MembersByName returns members from cache by guild ID and username
func (*CacheImpl) MessageCache ¶ added in v0.2.0
MessageCache returns the entire cache of Message(s) for a Channel
func (*CacheImpl) MessageChannel ¶
func (c *CacheImpl) MessageChannel(channelID api.Snowflake) *api.MessageChannel
MessageChannel returns a channel from dm or text channel cache by ID
func (*CacheImpl) RolesByName ¶
RolesByName returns roles from cache by guild ID and name
func (*CacheImpl) StoreChannel ¶
func (c *CacheImpl) StoreChannel(storeChannelID api.Snowflake) *api.StoreChannel
StoreChannel returns a store channel from cache by ID
func (*CacheImpl) StoreChannelCache ¶
StoreChannelCache returns the store channels of a guild by ID
func (*CacheImpl) StoreChannels ¶
func (c *CacheImpl) StoreChannels(guildID api.Snowflake) []*api.StoreChannel
StoreChannels returns store channels from cache by guild ID
func (*CacheImpl) StoreChannelsByName ¶
func (c *CacheImpl) StoreChannelsByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.StoreChannel
StoreChannelsByName returns store channels from cache by name
func (*CacheImpl) TextChannel ¶
func (c *CacheImpl) TextChannel(textChannelID api.Snowflake) *api.TextChannel
TextChannel returns a text channel from cache by ID
func (*CacheImpl) TextChannelCache ¶
TextChannelCache returns the channel cache as a map
func (*CacheImpl) TextChannels ¶
func (c *CacheImpl) TextChannels(guildID api.Snowflake) []*api.TextChannel
TextChannels returns the text channel cache from a guild
func (*CacheImpl) TextChannelsByName ¶
func (c *CacheImpl) TextChannelsByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.TextChannel
TextChannelsByName returns text channel from cache by guild ID and name
func (*CacheImpl) UncacheCategory ¶
UncacheCategory removes a category from cache
func (*CacheImpl) UncacheCommand ¶ added in v0.2.0
UncacheCommand removes a global Command from the cache
func (*CacheImpl) UncacheDMChannel ¶
UncacheDMChannel removes a DM channel from cache
func (*CacheImpl) UncacheEmote ¶ added in v0.2.0
UncacheEmote removes an Emote from api.Cache
func (*CacheImpl) UncacheGuild ¶
UncacheGuild removes a guild and all of it's children from the cache
func (*CacheImpl) UncacheMember ¶
UncacheMember removes a guild member from the cache
func (*CacheImpl) UncacheMessage ¶ added in v0.2.0
UncacheMessage removes a Message from the cache if the cache policy allows it
func (*CacheImpl) UncacheRole ¶
UncacheRole removes a role from cache
func (*CacheImpl) UncacheStoreChannel ¶
UncacheStoreChannel removes a store channel from cache
func (*CacheImpl) UncacheTextChannel ¶
UncacheTextChannel removes a text channel from the cache
func (*CacheImpl) UncacheUser ¶
UncacheUser removes a user from the cache
func (*CacheImpl) UncacheVoiceChannel ¶
UncacheVoiceChannel removes a voice channel from cache
func (*CacheImpl) UncacheVoiceState ¶ added in v0.2.0
UncacheVoiceState removes an api.VoiceState from the api.Cache
func (*CacheImpl) UsersByName ¶
UsersByName allows you to get users from the cache by username
func (*CacheImpl) VoiceChannel ¶
func (c *CacheImpl) VoiceChannel(voiceChannelID api.Snowflake) *api.VoiceChannel
VoiceChannel returns a voice channel from cache by ID
func (*CacheImpl) VoiceChannelCache ¶
VoiceChannelCache returns all of the voice channels from cache as a map
func (*CacheImpl) VoiceChannels ¶
func (c *CacheImpl) VoiceChannels(guildID api.Snowflake) []*api.VoiceChannel
VoiceChannels returns voice channels from a guild's cache
func (*CacheImpl) VoiceChannelsByName ¶
func (c *CacheImpl) VoiceChannelsByName(guildID api.Snowflake, name string, ignoreCase bool) []*api.VoiceChannel
VoiceChannelsByName returns voice channels from cache by name
func (*CacheImpl) VoiceState ¶ added in v0.2.0
VoiceState returns a Member's api.VoiceState for an api.Guild
func (*CacheImpl) VoiceStateCache ¶ added in v0.2.0
VoiceStateCache returns the api.VoiceState api.Cache of an api.Guild as a map
func (*CacheImpl) VoiceStates ¶ added in v0.2.0
func (c *CacheImpl) VoiceStates(guildID api.Snowflake) []*api.VoiceState
VoiceStates returns the member cache of a guild by snowflake
type DisgoBuilderImpl ¶
type DisgoBuilderImpl struct {
// contains filtered or unexported fields
}
DisgoBuilderImpl implementation of the api.DisgoBuilder interface
func (*DisgoBuilderImpl) AddEventListeners ¶
func (b *DisgoBuilderImpl) AddEventListeners(eventListeners ...api.EventListener) api.DisgoBuilder
AddEventListeners lets you add an api.EventListener to your api.EventManager
func (*DisgoBuilderImpl) Build ¶
func (b *DisgoBuilderImpl) Build() (api.Disgo, error)
Build builds your api.Disgo instance
func (*DisgoBuilderImpl) DisableCacheFlags ¶ added in v0.2.0
func (b *DisgoBuilderImpl) DisableCacheFlags(cacheFlags ...api.CacheFlags) api.DisgoBuilder
DisableCacheFlags lets you disable certain api.CacheFlags
func (*DisgoBuilderImpl) EnableCacheFlags ¶ added in v0.2.0
func (b *DisgoBuilderImpl) EnableCacheFlags(cacheFlags ...api.CacheFlags) api.DisgoBuilder
EnableCacheFlags lets you enable certain api.CacheFlags
func (*DisgoBuilderImpl) SetAudioController ¶ added in v0.2.0
func (b *DisgoBuilderImpl) SetAudioController(audioController api.AudioController) api.DisgoBuilder
SetAudioController lets you inject your own api.AudioController
func (*DisgoBuilderImpl) SetCache ¶
func (b *DisgoBuilderImpl) SetCache(cache api.Cache) api.DisgoBuilder
SetCache lets you inject your own api.Cache
func (*DisgoBuilderImpl) SetCacheFlags ¶ added in v0.2.0
func (b *DisgoBuilderImpl) SetCacheFlags(cacheFlags ...api.CacheFlags) api.DisgoBuilder
SetCacheFlags lets you set the api.CacheFlags
func (*DisgoBuilderImpl) SetEntityBuilder ¶ added in v0.2.0
func (b *DisgoBuilderImpl) SetEntityBuilder(entityBuilder api.EntityBuilder) api.DisgoBuilder
SetEntityBuilder lets you inject your own api.EntityBuilder
func (*DisgoBuilderImpl) SetEventManager ¶
func (b *DisgoBuilderImpl) SetEventManager(eventManager api.EventManager) api.DisgoBuilder
SetEventManager lets you inject your own api.EventManager
func (*DisgoBuilderImpl) SetGateway ¶
func (b *DisgoBuilderImpl) SetGateway(gateway api.Gateway) api.DisgoBuilder
SetGateway lets you inject your own api.Gateway
func (*DisgoBuilderImpl) SetGatewayIntents ¶ added in v0.3.3
func (b *DisgoBuilderImpl) SetGatewayIntents(gatewayIntents ...api.GatewayIntents) api.DisgoBuilder
SetGatewayIntents sets the api.GatewayIntents to connect to discord
func (*DisgoBuilderImpl) SetHTTPClient ¶ added in v0.3.0
func (b *DisgoBuilderImpl) SetHTTPClient(httpClient *http.Client) api.DisgoBuilder
SetHTTPClient sets the http.Client the api.RestClient uses
func (*DisgoBuilderImpl) SetLogger ¶ added in v0.2.0
func (b *DisgoBuilderImpl) SetLogger(logger log.Logger) api.DisgoBuilder
SetLogger sets logger implementation disgo should use as an example logrus
func (*DisgoBuilderImpl) SetMemberCachePolicy ¶
func (b *DisgoBuilderImpl) SetMemberCachePolicy(memberCachePolicy api.MemberCachePolicy) api.DisgoBuilder
SetMemberCachePolicy lets you set your own api.MemberCachePolicy
func (*DisgoBuilderImpl) SetMessageCachePolicy ¶ added in v0.2.0
func (b *DisgoBuilderImpl) SetMessageCachePolicy(messageCachePolicy api.MessageCachePolicy) api.DisgoBuilder
SetMessageCachePolicy lets you set your own api.MessageCachePolicy
func (*DisgoBuilderImpl) SetRawGatewayEventsEnabled ¶ added in v0.2.0
func (b *DisgoBuilderImpl) SetRawGatewayEventsEnabled(enabled bool) api.DisgoBuilder
SetRawGatewayEventsEnabled enables/disables the events.RawGatewayEvent
func (*DisgoBuilderImpl) SetRestClient ¶
func (b *DisgoBuilderImpl) SetRestClient(restClient api.RestClient) api.DisgoBuilder
SetRestClient lets you inject your own api.RestClient
func (*DisgoBuilderImpl) SetToken ¶
func (b *DisgoBuilderImpl) SetToken(token string) api.DisgoBuilder
SetToken sets the BotToken to connect to discord
func (*DisgoBuilderImpl) SetVoiceDispatchInterceptor ¶ added in v0.2.0
func (b *DisgoBuilderImpl) SetVoiceDispatchInterceptor(voiceDispatchInterceptor api.VoiceDispatchInterceptor) api.DisgoBuilder
SetVoiceDispatchInterceptor sets the api.VoiceDispatchInterceptor
func (*DisgoBuilderImpl) SetWebhookServer ¶
func (b *DisgoBuilderImpl) SetWebhookServer(webhookServer api.WebhookServer) api.DisgoBuilder
SetWebhookServer lets you inject your own api.EventManager
func (*DisgoBuilderImpl) SetWebhookServerProperties ¶
func (b *DisgoBuilderImpl) SetWebhookServerProperties(listenURL string, listenPort int, publicKey string) api.DisgoBuilder
SetWebhookServerProperties sets the default api.WebhookServer properties
type DisgoImpl ¶
type DisgoImpl struct {
// contains filtered or unexported fields
}
DisgoImpl is the main discord client
func (*DisgoImpl) ApplicationID ¶
ApplicationID returns the current application id
func (*DisgoImpl) AudioController ¶ added in v0.2.0
func (d *DisgoImpl) AudioController() api.AudioController
AudioController returns the api.AudioController which can be used to connect/reconnect/disconnect to/fom an api.VoiceChannel
func (*DisgoImpl) Close ¶
func (d *DisgoImpl) Close()
Close will cleanup all disgo internals and close the discord connection safely
func (*DisgoImpl) CreateCommand ¶
func (d *DisgoImpl) CreateCommand(command api.CommandCreate) (*api.Command, restclient.RestError)
CreateCommand creates a new global api.Command
func (*DisgoImpl) CreateGuildCommand ¶ added in v0.4.2
func (d *DisgoImpl) CreateGuildCommand(guildID api.Snowflake, command api.CommandCreate) (*api.Command, restclient.RestError)
CreateGuildCommand creates a new api.Command for this api.Guild
func (*DisgoImpl) CreateGuildFromTemplate ¶ added in v0.5.2
func (d *DisgoImpl) CreateGuildFromTemplate(templateCode string, createGuildFromTemplate api.CreateGuildFromTemplate) (*api.Guild, restclient.RestError)
CreateGuildFromTemplate creates an api.Guild using an api.Template code
func (*DisgoImpl) DeleteCommand ¶
func (d *DisgoImpl) DeleteCommand(commandID api.Snowflake) restclient.RestError
DeleteCommand creates a new global api.Command
func (*DisgoImpl) DeleteGuildCommand ¶ added in v0.4.2
func (d *DisgoImpl) DeleteGuildCommand(guildID api.Snowflake, commandID api.Snowflake) restclient.RestError
DeleteGuildCommand creates a new api.Command for this api.Guild
func (*DisgoImpl) EditCommand ¶
func (d *DisgoImpl) EditCommand(commandID api.Snowflake, command api.CommandUpdate) (*api.Command, restclient.RestError)
EditCommand edits a specific global api.Command
func (*DisgoImpl) EditGuildCommand ¶ added in v0.4.2
func (d *DisgoImpl) EditGuildCommand(guildID api.Snowflake, commandID api.Snowflake, command api.CommandUpdate) (*api.Command, restclient.RestError)
EditGuildCommand edits a specific api.Guild api.Command
func (*DisgoImpl) EntityBuilder ¶ added in v0.2.0
func (d *DisgoImpl) EntityBuilder() api.EntityBuilder
EntityBuilder returns the api.EntityBuilder
func (*DisgoImpl) EventManager ¶
func (d *DisgoImpl) EventManager() api.EventManager
EventManager returns the api.EventManager
func (*DisgoImpl) GatewayIntents ¶ added in v0.3.3
func (d *DisgoImpl) GatewayIntents() api.GatewayIntents
GatewayIntents returns the GatewayIntents originally specified when creating the client
func (*DisgoImpl) GetCommand ¶
GetCommand fetches a specific global api.Command
func (*DisgoImpl) GetCommands ¶
func (d *DisgoImpl) GetCommands() ([]*api.Command, restclient.RestError)
GetCommands fetches all global api.Command(s)
func (*DisgoImpl) GetGuildCommand ¶ added in v0.4.2
func (d *DisgoImpl) GetGuildCommand(guildID api.Snowflake, commandID api.Snowflake) (*api.Command, restclient.RestError)
GetGuildCommand fetches a specific api.Guild api.Command
func (*DisgoImpl) GetGuildCommandPermissions ¶ added in v0.4.2
func (d *DisgoImpl) GetGuildCommandPermissions(guildID api.Snowflake, commandID api.Snowflake) (*api.GuildCommandPermissions, restclient.RestError)
GetGuildCommandPermissions returns the api.GuildCommandPermissions for a specific api.Command in an api.Guild
func (*DisgoImpl) GetGuildCommands ¶ added in v0.4.2
GetGuildCommands fetches all api.Guild api.Command(s)
func (*DisgoImpl) GetGuildCommandsPermissions ¶ added in v0.4.2
func (d *DisgoImpl) GetGuildCommandsPermissions(guildID api.Snowflake) ([]*api.GuildCommandPermissions, restclient.RestError)
GetGuildCommandsPermissions returns the api.GuildCommandPermissions for a all api.Command(s) in an api.Guild
func (*DisgoImpl) GetTemplate ¶ added in v0.5.2
func (d *DisgoImpl) GetTemplate(code string) (*api.GuildTemplate, restclient.RestError)
GetTemplate gets an api.GuildTemplate by it's code
func (*DisgoImpl) HasGateway ¶ added in v0.2.0
HasGateway returns whether api.Disgo has an active api.Gateway connection or not
func (*DisgoImpl) HeartbeatLatency ¶
HeartbeatLatency returns the heartbeat latency
func (*DisgoImpl) LargeThreshold ¶ added in v0.2.0
LargeThreshold returns the large threshold set
func (*DisgoImpl) RawGatewayEventsEnabled ¶ added in v0.2.0
RawGatewayEventsEnabled returns if the events.RawGatewayEvent is enabled/disabled
func (*DisgoImpl) RestClient ¶
func (d *DisgoImpl) RestClient() api.RestClient
RestClient returns the HTTP client used by disgo
func (*DisgoImpl) SetCommands ¶
func (d *DisgoImpl) SetCommands(commands ...api.CommandCreate) ([]*api.Command, restclient.RestError)
SetCommands overrides all global api.Command(s)
func (*DisgoImpl) SetGuildCommandPermissions ¶ added in v0.4.2
func (d *DisgoImpl) SetGuildCommandPermissions(guildID api.Snowflake, commandID api.Snowflake, permissions api.SetGuildCommandPermissions) (*api.GuildCommandPermissions, restclient.RestError)
SetGuildCommandPermissions sets the api.GuildCommandPermissions for a specific api.Command
func (*DisgoImpl) SetGuildCommands ¶ added in v0.4.2
func (d *DisgoImpl) SetGuildCommands(guildID api.Snowflake, commands ...api.CommandCreate) ([]*api.Command, restclient.RestError)
SetGuildCommands overrides all api.Command(s) for this api.Guild
func (*DisgoImpl) SetGuildCommandsPermissions ¶ added in v0.4.2
func (d *DisgoImpl) SetGuildCommandsPermissions(guildID api.Snowflake, commandPermissions ...api.SetGuildCommandPermissions) ([]*api.GuildCommandPermissions, restclient.RestError)
SetGuildCommandsPermissions sets the api.GuildCommandPermissions for a all api.Command(s)
func (*DisgoImpl) SetVoiceDispatchInterceptor ¶ added in v0.2.0
func (d *DisgoImpl) SetVoiceDispatchInterceptor(voiceDispatchInterceptor api.VoiceDispatchInterceptor)
SetVoiceDispatchInterceptor sets the api.VoiceDispatchInterceptor
func (*DisgoImpl) VoiceDispatchInterceptor ¶ added in v0.2.0
func (d *DisgoImpl) VoiceDispatchInterceptor() api.VoiceDispatchInterceptor
VoiceDispatchInterceptor returns the api.VoiceDispatchInterceptor
func (*DisgoImpl) WebhookServer ¶
func (d *DisgoImpl) WebhookServer() api.WebhookServer
WebhookServer returns the api.EventManager
type EntityBuilderImpl ¶ added in v0.2.0
type EntityBuilderImpl struct {
// contains filtered or unexported fields
}
EntityBuilderImpl is used for creating structs used by Disgo
func (*EntityBuilderImpl) CreateAuditLog ¶ added in v0.5.6
func (b *EntityBuilderImpl) CreateAuditLog(guildID api.Snowflake, auditLogFilterOptions api.AuditLogFilterOptions, auditLog *api.AuditLog, updateCache api.CacheStrategy) *api.AuditLog
CreateAuditLog returns a new api.AuditLog entity
func (*EntityBuilderImpl) CreateButtonInteraction ¶ added in v0.4.0
func (b *EntityBuilderImpl) CreateButtonInteraction(fullInteraction *api.FullInteraction, componentInteraction *api.ComponentInteraction) *api.ButtonInteraction
CreateButtonInteraction creates an api.ButtonInteraction from the api.FullInteraction response
func (*EntityBuilderImpl) CreateCategory ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateCategory(channel *api.Channel, updateCache api.CacheStrategy) *api.Category
CreateCategory returns a new api.Category entity
func (*EntityBuilderImpl) CreateCommandInteraction ¶ added in v0.4.0
func (b *EntityBuilderImpl) CreateCommandInteraction(fullInteraction *api.FullInteraction, interaction *api.Interaction, updateCache api.CacheStrategy) *api.CommandInteraction
CreateCommandInteraction creates an api.CommandInteraction from the api.FullInteraction response
func (*EntityBuilderImpl) CreateComponentInteraction ¶ added in v0.4.5
func (b *EntityBuilderImpl) CreateComponentInteraction(fullInteraction *api.FullInteraction, interaction *api.Interaction, updateCache api.CacheStrategy) *api.ComponentInteraction
CreateComponentInteraction creates an api.ComponentInteraction from the api.FullInteraction response
func (*EntityBuilderImpl) CreateDMChannel ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateDMChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.DMChannel
CreateDMChannel returns a new api.DMChannel entity
func (*EntityBuilderImpl) CreateEmoji ¶ added in v0.4.3
func (b *EntityBuilderImpl) CreateEmoji(guildID api.Snowflake, emoji *api.Emoji, updateCache api.CacheStrategy) *api.Emoji
CreateEmoji returns a new api.Emoji entity
func (*EntityBuilderImpl) CreateGlobalCommand ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateGlobalCommand(command *api.Command, updateCache api.CacheStrategy) *api.Command
CreateGlobalCommand returns a new api.Command entity
func (*EntityBuilderImpl) CreateGuild ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateGuild(fullGuild *api.FullGuild, updateCache api.CacheStrategy) *api.Guild
CreateGuild returns a new api.Guild entity
func (*EntityBuilderImpl) CreateGuildCommand ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateGuildCommand(guildID api.Snowflake, command *api.Command, updateCache api.CacheStrategy) *api.Command
CreateGuildCommand returns a new api.Command entity
func (*EntityBuilderImpl) CreateGuildCommandPermissions ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateGuildCommandPermissions(guildCommandPermissions *api.GuildCommandPermissions, updateCache api.CacheStrategy) *api.GuildCommandPermissions
CreateGuildCommandPermissions returns a new api.GuildCommandPermissions entity
func (*EntityBuilderImpl) CreateGuildTemplate ¶ added in v0.5.2
func (b *EntityBuilderImpl) CreateGuildTemplate(guildTemplate *api.GuildTemplate, updateCache api.CacheStrategy) *api.GuildTemplate
CreateGuildTemplate returns a new api.GuildTemplate entity
func (*EntityBuilderImpl) CreateIntegration ¶ added in v0.5.6
func (b *EntityBuilderImpl) CreateIntegration(guildID api.Snowflake, integration *api.Integration, updateCache api.CacheStrategy) *api.Integration
CreateIntegration returns a new api.Integration entity
func (EntityBuilderImpl) CreateInteraction ¶ added in v0.3.0
func (b EntityBuilderImpl) CreateInteraction(fullInteraction *api.FullInteraction, c chan api.InteractionResponse, updateCache api.CacheStrategy) *api.Interaction
CreateInteraction creates an api.Interaction from the api.FullInteraction response
func (*EntityBuilderImpl) CreateMember ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateMember(guildID api.Snowflake, member *api.Member, updateCache api.CacheStrategy) *api.Member
CreateMember returns a new api.Member entity
func (*EntityBuilderImpl) CreateMessage ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateMessage(message *api.Message, updateCache api.CacheStrategy) *api.Message
CreateMessage returns a new api.Message entity
func (*EntityBuilderImpl) CreateRole ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateRole(guildID api.Snowflake, role *api.Role, updateCache api.CacheStrategy) *api.Role
CreateRole returns a new api.Role entity
func (*EntityBuilderImpl) CreateSelectMenuInteraction ¶ added in v0.4.5
func (b *EntityBuilderImpl) CreateSelectMenuInteraction(fullInteraction *api.FullInteraction, componentInteraction *api.ComponentInteraction) *api.SelectMenuInteraction
CreateSelectMenuInteraction creates an api.SelectMenuInteraction from the api.FullInteraction response
func (*EntityBuilderImpl) CreateStoreChannel ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateStoreChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.StoreChannel
CreateStoreChannel returns a new api.StoreChannel entity
func (*EntityBuilderImpl) CreateTextChannel ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateTextChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.TextChannel
CreateTextChannel returns a new api.TextChannel entity
func (*EntityBuilderImpl) CreateUser ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateUser(user *api.User, updateCache api.CacheStrategy) *api.User
CreateUser returns a new api.User entity
func (*EntityBuilderImpl) CreateVoiceChannel ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateVoiceChannel(channel *api.Channel, updateCache api.CacheStrategy) *api.VoiceChannel
CreateVoiceChannel returns a new api.VoiceChannel entity
func (*EntityBuilderImpl) CreateVoiceState ¶ added in v0.2.0
func (b *EntityBuilderImpl) CreateVoiceState(guildID api.Snowflake, voiceState *api.VoiceState, updateCache api.CacheStrategy) *api.VoiceState
CreateVoiceState returns a new api.VoiceState entity
func (*EntityBuilderImpl) Disgo ¶ added in v0.2.0
func (b *EntityBuilderImpl) Disgo() api.Disgo
Disgo returns the api.Disgo client
type EventManagerImpl ¶
type EventManagerImpl struct {
// contains filtered or unexported fields
}
EventManagerImpl is the implementation of api.EventManager
func (*EventManagerImpl) AddEventListeners ¶
func (e *EventManagerImpl) AddEventListeners(listeners ...api.EventListener)
AddEventListeners adds one or more api.EventListener(s) to the api.EventManager
func (*EventManagerImpl) Close ¶ added in v0.2.0
func (e *EventManagerImpl) Close()
Close closes all goroutines created by the api.EventManager
func (*EventManagerImpl) Disgo ¶ added in v0.2.0
func (e *EventManagerImpl) Disgo() api.Disgo
Disgo returns the api.Disgo instance used by the api.EventManager
func (*EventManagerImpl) Dispatch ¶
func (e *EventManagerImpl) Dispatch(event api.Event)
Dispatch dispatches a new event to the client
func (*EventManagerImpl) Handle ¶
func (e *EventManagerImpl) Handle(name api.GatewayEventType, c chan api.InteractionResponse, sequenceNumber int, payload json.RawMessage)
Handle calls the correct api.EventHandler
func (*EventManagerImpl) ListenEvents ¶
func (e *EventManagerImpl) ListenEvents()
ListenEvents starts the event goroutine
type GatewayImpl ¶
type GatewayImpl struct {
// contains filtered or unexported fields
}
GatewayImpl is what is used to connect to discord
func (*GatewayImpl) Conn ¶ added in v0.2.0
func (g *GatewayImpl) Conn() *websocket.Conn
Conn returns the underlying websocket.Conn of this api.Gateway
func (*GatewayImpl) Disgo ¶
func (g *GatewayImpl) Disgo() api.Disgo
Disgo returns the gateway's disgo client
func (*GatewayImpl) Latency ¶
func (g *GatewayImpl) Latency() time.Duration
Latency returns the api.Gateway latency
func (*GatewayImpl) Open ¶
func (g *GatewayImpl) Open() error
Open initializes the client and connection to discord
func (*GatewayImpl) Send ¶ added in v0.4.5
func (g *GatewayImpl) Send(command api.GatewayCommand) error
Send sends a payload to the Gateway
func (*GatewayImpl) Status ¶
func (g *GatewayImpl) Status() api.GatewayStatus
Status returns the gateway connection status
type WebhookServerImpl ¶
type WebhookServerImpl struct {
// contains filtered or unexported fields
}
WebhookServerImpl is used in Disgo's webhook server for interactions
func (*WebhookServerImpl) Close ¶
func (w *WebhookServerImpl) Close()
Close shuts down the WebhookServerImpl
func (*WebhookServerImpl) Disgo ¶
func (w *WebhookServerImpl) Disgo() api.Disgo
Disgo returns the Disgo client
func (*WebhookServerImpl) ListenURL ¶
func (w *WebhookServerImpl) ListenURL() string
ListenURL returns the URL that the server is listening on
func (*WebhookServerImpl) PublicKey ¶
func (w *WebhookServerImpl) PublicKey() ed25519.PublicKey
PublicKey returns the public key to verify the discord requests with
func (*WebhookServerImpl) Router ¶
func (w *WebhookServerImpl) Router() *mux.Router
Router returns the mux router used on the webhook server
func (*WebhookServerImpl) Start ¶
func (w *WebhookServerImpl) Start()
Start makes the WebhookServerImpl listen on the specified port and handle requests