config

package
v0.0.0-...-0e46d6e Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Current = DefaultConfig()

Current loaded configuration.

Functions

func LoadSettings

func LoadSettings() error

LoadSettings reads a chatbot.toml from disk if available.

func WriteSettings

func WriteSettings() error

WriteSettings will commit the chatbot.toml to disk.

Types

type BareRTC

type BareRTC struct {
	AdminAPIKey string
	URL         string
}

type Config

type Config struct {
	Version int // will re-save your chatbot.toml on migrations

	// Chat server config
	BareRTC BareRTC

	// Profile settings for their chat username
	Profile Profile

	WebSocketReadLimit int64
}

Config for your BareBot robot.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns sensible defaults and will write the initial chatbot.toml file to disk.

type Profile

type Profile struct {
	Username   string
	Nickname   string
	ProfileURL string
	AvatarURL  string
	Emoji      string
	Gender     string
	IsAdmin    bool
}

Jump to

Keyboard shortcuts

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