dbot

package
v0.0.0-...-4af85e5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "canary"
)

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Client  bot.Client
	Handler handler.Router
	Webhook webhook.Client
	Logger  log.Logger
	Config  *Config
	Ctx     context.Context
	Debug   bool
}

func New

func New(ctx context.Context, logger log.Logger, cfg *Config) *Bot

func (*Bot) Close

func (b *Bot) Close()

func (*Bot) Setup

func (b *Bot) Setup(listeners ...bot.EventListener) (err error)

func (*Bot) Start

func (b *Bot) Start() error

type Config

type Config struct {
	Core struct {
		Token      string
		MaxThreads int
	}
	Disc struct {
		GuildID    snowflake.ID
		DevChannel snowflake.ID
	}
	Roles struct {
		RoleChannel snowflake.ID
		VARole      snowflake.ID
	}
	Webhook struct {
		Enabled bool
		ID      snowflake.ID
		Token   string
	}
	Log struct {
		Level      string
		Dir        string
		ExpireTime string
	}
	FuzzNet struct {
		Domain string
		APIKey string
	}
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

Jump to

Keyboard shortcuts

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