utils

package
v0.0.0-...-d17e1d7 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = minori.GetLogger("Aisaka Taiga")
View Source
var Rand = rand.New(rand.NewSource(time.Now().Unix()))

Functions

func ErrorHandler

func ErrorHandler(bot *sapphire.Bot, err interface{})

func GetConfig

func GetConfig(key string) string

func RandNumber

func RandNumber(r int) int

func Roll

func Roll(ls []string) string

func Trim

func Trim(text string, limit int) string

Trim trims down extra characters that hit the limit and appends "..." at the end to signify trimmed output.

Types

type String

type String struct {
	// contains filtered or unexported fields
}

func NewString

func NewString(towrap string) *String

func (*String) Add

func (s *String) Add(str string) *String

func (*String) Build

func (s *String) Build() string

func (*String) Replace

func (s *String) Replace(one, two string) *String

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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