core

package
v0.0.0-...-edf0acf Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument string

func (Argument) AsBool

func (a Argument) AsBool() (bool, error)

func (Argument) AsInt

func (a Argument) AsInt() (int, error)

func (Argument) AsString

func (a Argument) AsString() string

type ArgumentList

type ArgumentList []Argument

func (ArgumentList) Contains

func (al ArgumentList) Contains(value string) bool

func (ArgumentList) Get

func (al ArgumentList) Get(index int) Argument

func (ArgumentList) IndexOf

func (al ArgumentList) IndexOf(value string) int

func (ArgumentList) Splice

func (al ArgumentList) Splice(index, deleteCount int) ArgumentList

type Bot

type Bot struct {
	Token  string
	Prefix string
}

type Config

type Config struct {
	Bot     *Bot
	Mongodb *Mongodb
}

func DefaultConfig

func DefaultConfig() *Config

type Context

type Context struct {
	Session *discordgo.Session
	Message *discordgo.Message
	Channel *discordgo.Channel
	Args    ArgumentList
}

func (*Context) SendMessage

func (ctx *Context) SendMessage(content string)

func (*Context) SendMessageReply

func (ctx *Context) SendMessageReply(content string)

type Mongodb

type Mongodb struct {
	Uri string
}

type YAMLConfigParser

type YAMLConfigParser struct{}

func (*YAMLConfigParser) Decode

func (y *YAMLConfigParser) Decode(r io.Reader) (cfg *Config, err error)

func (*YAMLConfigParser) Encode

func (y *YAMLConfigParser) Encode(r io.Writer, cfg *Config) (err error)

Jump to

Keyboard shortcuts

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