fun

package
v0.0.0-...-7ecd1d8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 16 Imported by: 0

README

Fun

Provides the fun commands config.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBSchemas = []string{`
CREATE TABLE IF NOT EXISTS fun_settings (
	guild_id        bigint PRIMARY KEY,
	topics     TEXT NOT NULL,
	nsfw_topics         TEXT NOT NULL,
	dad_jokes         TEXT NOT NULL,
	wyrs         TEXT NOT NULL,
	nsfw_wyrs         TEXT NOT NULL
)`,
}
View Source
var PageHTMLSettings string

Functions

func DefaultConfig

func DefaultConfig(guildID int64) *models.FunSetting

func GetConfig

func GetConfig(ctx context.Context, guildID int64) (*models.FunSetting, error)

func HandleGetFunSettings

func HandleGetFunSettings(w http.ResponseWriter, r *http.Request) interface{}

func HandlePostFunSettings

func HandlePostFunSettings(w http.ResponseWriter, r *http.Request) (templateData web.TemplateData, err error)

func RegisterPlugin

func RegisterPlugin()

Types

type FunConfigForm

type FunConfigForm struct {
	Topics     string
	NSFWTopics string
	DadJokes   string
	Wyrs       string
	NSFWWyrs   string
}

func (FunConfigForm) FunSetting

func (p FunConfigForm) FunSetting() *models.FunSetting

type Plugin

type Plugin struct{}

func (*Plugin) AddCommands

func (p *Plugin) AddCommands()

func (*Plugin) BotInit

func (p *Plugin) BotInit()

func (*Plugin) InitWeb

func (p *Plugin) InitWeb()

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() *common.PluginInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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