Documentation
¶
Index ¶
- func IDFromToken(token string) (*discord.Snowflake, error)
- func New(token string, opts ...ConfigOpt) (*core.Bot, error)
- type Config
- type ConfigOpt
- func WithAsyncEventsEnabled() ConfigOpt
- func WithAudioController(audioController core.AudioController) ConfigOpt
- func WithCacheConfig(cacheConfig core.CacheConfig) ConfigOpt
- func WithCacheOpts(opts ...core.CacheConfigOpt) ConfigOpt
- func WithCaches(caches core.Caches) ConfigOpt
- func WithCollectors(collectors core.Collectors) ConfigOpt
- func WithCollectorsConfig(collectorsConfig core.CollectorsConfig) ConfigOpt
- func WithEntityBuilder(entityBuilder core.EntityBuilder) ConfigOpt
- func WithEventListeners(listeners ...core.EventListener) ConfigOpt
- func WithEventManager(eventManager core.EventManager) ConfigOpt
- func WithGateway(gateway gateway.Gateway) ConfigOpt
- func WithGatewayConfig(gatewayConfig gateway.Config) ConfigOpt
- func WithGatewayOpts(opts ...gateway.ConfigOpt) ConfigOpt
- func WithHTTPServer(httpServer httpserver.Server) ConfigOpt
- func WithHTTPServerConfig(httpServerConfig httpserver.Config) ConfigOpt
- func WithHTTPServerOpts(opts ...httpserver.ConfigOpt) ConfigOpt
- func WithLogger(logger log.Logger) ConfigOpt
- func WithMemberChunkingFilter(memberChunkingFilter core.MemberChunkingFilter) ConfigOpt
- func WithMemberChunkingManager(memberChunkingManager core.MemberChunkingManager) ConfigOpt
- func WithRawEventsEnabled() ConfigOpt
- func WithRestClient(restClient rest.Client) ConfigOpt
- func WithRestClientConfig(restClientConfig rest.Config) ConfigOpt
- func WithRestClientOpts(opts ...rest.ConfigOpt) ConfigOpt
- func WithRestServices(restServices rest.Services) ConfigOpt
- func WithShardManager(shardManager sharding.ShardManager) ConfigOpt
- func WithShardManagerConfig(shardManagerConfig sharding.Config) ConfigOpt
- func WithShardManagerOpts(opts ...sharding.ConfigOpt) ConfigOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDFromToken ¶
IDFromToken returns the applicationID from the BotToken
Types ¶
type Config ¶
type Config struct {
Logger log.Logger
RestClient rest.Client
RestClientConfig *rest.Config
RestServices rest.Services
EventManager core.EventManager
EventManagerConfig *core.EventManagerConfig
Collectors core.Collectors
CollectorsConfig *core.CollectorsConfig
Gateway gateway.Gateway
GatewayConfig *gateway.Config
ShardManager sharding.ShardManager
ShardManagerConfig *sharding.Config
HTTPServer httpserver.Server
HTTPServerConfig *httpserver.Config
Caches core.Caches
CacheConfig *core.CacheConfig
AudioController core.AudioController
EntityBuilder core.EntityBuilder
MemberChunkingManager core.MemberChunkingManager
MemberChunkingFilter *core.MemberChunkingFilter
}
Config lets you configure your Bot instance Config is the core.Bot config used to configure everything
type ConfigOpt ¶
type ConfigOpt func(config *Config)
func WithAsyncEventsEnabled ¶
func WithAsyncEventsEnabled() ConfigOpt
func WithAudioController ¶
func WithAudioController(audioController core.AudioController) ConfigOpt
func WithCacheConfig ¶
func WithCacheConfig(cacheConfig core.CacheConfig) ConfigOpt
func WithCacheOpts ¶
func WithCacheOpts(opts ...core.CacheConfigOpt) ConfigOpt
func WithCaches ¶
func WithCollectors ¶
func WithCollectors(collectors core.Collectors) ConfigOpt
func WithCollectorsConfig ¶
func WithCollectorsConfig(collectorsConfig core.CollectorsConfig) ConfigOpt
func WithEntityBuilder ¶
func WithEntityBuilder(entityBuilder core.EntityBuilder) ConfigOpt
func WithEventListeners ¶
func WithEventListeners(listeners ...core.EventListener) ConfigOpt
func WithEventManager ¶
func WithEventManager(eventManager core.EventManager) ConfigOpt
func WithGateway ¶
func WithGatewayConfig ¶
func WithGatewayOpts ¶
func WithHTTPServer ¶
func WithHTTPServer(httpServer httpserver.Server) ConfigOpt
func WithHTTPServerConfig ¶
func WithHTTPServerConfig(httpServerConfig httpserver.Config) ConfigOpt
func WithHTTPServerOpts ¶
func WithHTTPServerOpts(opts ...httpserver.ConfigOpt) ConfigOpt
func WithLogger ¶
WithLogger lets you inject your own logger implementing log.Logger
func WithMemberChunkingFilter ¶
func WithMemberChunkingFilter(memberChunkingFilter core.MemberChunkingFilter) ConfigOpt
func WithMemberChunkingManager ¶
func WithMemberChunkingManager(memberChunkingManager core.MemberChunkingManager) ConfigOpt
func WithRawEventsEnabled ¶
func WithRawEventsEnabled() ConfigOpt
func WithRestClient ¶
func WithRestClientConfig ¶
func WithRestClientOpts ¶
func WithRestServices ¶
func WithShardManager ¶
func WithShardManager(shardManager sharding.ShardManager) ConfigOpt
func WithShardManagerConfig ¶
func WithShardManagerOpts ¶
Click to show internal directories.
Click to hide internal directories.