discord

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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