discord

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig added in v0.0.10

func LoadConfig() (*discfg.Config, error)

func LoadListener added in v0.0.9

func LoadListener(cfg discfg.ServerConfig) net.Listener

func LoadTexitClient added in v0.0.9

func LoadTexitClient(address string, key string) texit.Invoker

func LoadTracker added in v0.0.10

func LoadTracker(cfg *discfg.TrackerConfig) (pending_execution.Tracker, error)

Types

type AutoCompleteFunc

type AutoCompleteFunc func(*comctx.CommandContext) []tempest.Choice

type Bot

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

func NewBot

func NewBot(hdl *handler.Handler, tmpst *tempest.Client, opts ...BotOption) *Bot

func (*Bot) AutoCompletePreflight

func (b *Bot) AutoCompletePreflight(logLevel zerolog.Level, comFunc AutoCompleteFunc) func(itx tempest.CommandInteraction) []tempest.Choice

func (*Bot) CommandPreflight

func (b *Bot) CommandPreflight(comFunc CommandFunc) func(itx *tempest.CommandInteraction)

func (*Bot) Handler

func (b *Bot) Handler() *handler.Handler

func (*Bot) HttpHandler added in v0.0.6

func (b *Bot) HttpHandler() http.Handler

func (*Bot) Init added in v0.0.6

func (b *Bot) Init() error

func (*Bot) LogLevel

func (b *Bot) LogLevel() zerolog.Level

func (*Bot) Serve added in v0.0.6

func (b *Bot) Serve(ctx context.Context, lis net.Listener) error

func (*Bot) Tempest

func (b *Bot) Tempest() *tempest.Client

type BotOption

type BotOption func(*Bot)

func WithAuthorizedUsers

func WithAuthorizedUsers(users []tempest.Snowflake) BotOption

func WithGuilds

func WithGuilds(guilds []tempest.Snowflake) BotOption

func WithLogLevel

func WithLogLevel(level zerolog.Level) BotOption

type CommandFunc

type CommandFunc func(*comctx.CommandContext)

type Sec added in v0.0.9

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

func (Sec) SmithyAPIHttpApiKeyAuth added in v0.0.9

func (s Sec) SmithyAPIHttpApiKeyAuth(ctx context.Context, operationName string) (texit.SmithyAPIHttpApiKeyAuth, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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