playground

package
v0.0.0-...-ca060dc Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, pg Executer)

func ReplaceShorthandf

func ReplaceShorthandf(shorthandf string) string

Types

type Executer

type Executer interface {
	Shorthand() string
	ExecuteFull(code string) (*Result, error)
	ExecuteShorthand(header, code string) (*Result, error)
}

type Playground

type Playground struct {
	Ctx *bot.Context
}

func New

func New() *Playground

func (*Playground) Help

func (p *Playground) Help() string

func (*Playground) List

func (*Playground) Run

func (*Playground) Setup

func (p *Playground) Setup(sub *bot.Subcommand)

func (*Playground) Shorthand

func (p *Playground) Shorthand(m *gateway.MessageCreateEvent, lang string) (string, error)

type Result

type Result struct {
	Output string
	Errors string
	Image  []byte
	Dura   time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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