yaml

package
v0.0.0-...-c4580cc Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Antispam

type Antispam struct {
	Enabled            bool     `yaml:"enabled"`
	ModeratorsBypass   bool     `yaml:"moderatorsBypass"`
	LogChannelId       string   `yaml:"logChannelId"`
	MessageTTLSec      int      `yaml:"messageTTLSec"`
	MaxChannelsPerUser int      `yaml:"maxChannelsPerUser"`
	DenyTTLSec         int      `yaml:"denyTTLSec"`
	TrackedChannelIds  []string `yaml:"trackedChannelIds"`
}

func NewAntispam

func NewAntispam(config *Config) Antispam

type ArchiveCommand

type ArchiveCommand struct {
	Description string `yaml:"description"`
	Response    string `yaml:"response"`
}

func NewArchiveCommand

func NewArchiveCommand(config *Config) ArchiveCommand

type ChannelSolvedTag

type ChannelSolvedTag map[string]string

type Command

type Command struct {
	Description string         `yaml:"description"`
	Content     string         `yaml:"content"`
	Protected   bool           `yaml:"protected"`
	Buttons     CommandButtons `yaml:"buttons"`
}

type CommandButton

type CommandButton struct {
	Label string `yaml:"label"`
	URL   string `yaml:"url"`
	Emoji string `yaml:"emoji"`
}

type CommandButtons

type CommandButtons [][]CommandButton

type Commands

type Commands map[string]Command

func NewCommands

func NewCommands(config *Config) Commands

type Config

type Config struct {
	Moderators     Moderators     `yaml:"moderators"`
	Antispam       Antispam       `yaml:"antispam"`
	RateLimit      RateLimit      `yaml:"rateLimit"`
	Forms          Forms          `yaml:"forms"`
	ArchiveCommand ArchiveCommand `yaml:"archiveCommand"`
	SolvedCommand  SolvedCommand  `yaml:"solvedCommand"`
	Commands       Commands       `yaml:"commands"`
}

func NewConfig

func NewConfig(path Path) (*Config, error)

type Form

type Form struct {
	ChannelId             string               `yaml:"channelId"`
	ModChannelId          string               `yaml:"modChannelId"`
	ModalTitle            string               `yaml:"modalTitle"`
	ModSkipApproval       bool                 `yaml:"modSkipApproval"`
	Color                 int                  `yaml:"color"`
	MinimumAccountAgeDays int                  `yaml:"minimumAccountAgeDays"`
	MinimumServerJoinDays int                  `yaml:"minimumServerJoinDays"`
	OpenModalMessage      FormOpenModalMessage `yaml:"openModalMessage"`
	Footer                string               `yaml:"footer"`
	Inputs                []FormInput          `yaml:"inputs"`
}

type FormInput

type FormInput struct {
	Id          string `yaml:"id"`
	Label       string `yaml:"label"`
	Placeholder string `yaml:"placeholder"`
	Multiline   bool   `yaml:"multiline"`
	Min         int    `yaml:"min"`
	Max         int    `yaml:"max"`
	Required    bool   `yaml:"required"`
}

type FormOpenModalMessage

type FormOpenModalMessage struct {
	ButtonLabel      string `yaml:"buttonLabel"`
	EmbedColor       int    `yaml:"embedColor"`
	EmbedTitle       string `yaml:"embedTitle"`
	EmbedDescription string `yaml:"embedDescription"`
}

type Forms

type Forms map[string]Form

func NewForms

func NewForms(config *Config) Forms

type Moderators

type Moderators []string

func NewModerators

func NewModerators(config *Config) Moderators

type Path

type Path string

type RateLimit

type RateLimit struct {
	TTLSec   int    `yaml:"ttlSec"`
	MaxUsage int    `yaml:"maxUsage"`
	Message  string `yaml:"message"`
}

func NewRateLimit

func NewRateLimit(config *Config) RateLimit

type SolvedCommand

type SolvedCommand struct {
	Description      string           `yaml:"description"`
	Response         string           `yaml:"response"`
	ChannelSolvedTag ChannelSolvedTag `yaml:"channelSolvedTag"`
}

func NewSolvedCommand

func NewSolvedCommand(config *Config) SolvedCommand

Jump to

Keyboard shortcuts

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