base

package
v0.0.0-...-531763a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxNameLength = 240

Variables

This section is empty.

Functions

func CheckName

func CheckName(name string) (string, types.Resp)

CheckName checks the validity of a name & returns a cleaned up version + error

Types

type Base

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

func NewBase

func NewBase(s *sevcord.Sevcord, db *sqlx.DB) *Base

func (*Base) CalcQuery

func (b *Base) CalcQuery(ctx sevcord.Ctx, name string) (*types.Query, bool)

func (*Base) CheckCtx

func (b *Base) CheckCtx(ctx sevcord.Ctx, cmd string) bool

func (*Base) ConfigNews

func (b *Base) ConfigNews(c sevcord.Ctx, opts []any)

func (*Base) ConfigPlayChannels

func (b *Base) ConfigPlayChannels(c sevcord.Ctx, opts []any)

func (*Base) ConfigPlayChannelsHandler

func (b *Base) ConfigPlayChannelsHandler(c sevcord.Ctx, params string, opts []string)

func (*Base) ConfigPollCnt

func (b *Base) ConfigPollCnt(c sevcord.Ctx, opts []any)

func (*Base) ConfigVoteCnt

func (b *Base) ConfigVoteCnt(c sevcord.Ctx, opts []any)

func (*Base) ConfigVoting

func (b *Base) ConfigVoting(c sevcord.Ctx, opts []any)

func (*Base) Error

func (b *Base) Error(ctx sevcord.Ctx, err error, config ...string)

func (*Base) GetCombCache

func (b *Base) GetCombCache(c sevcord.Ctx) (types.CombCache, types.Resp)

func (*Base) GetName

func (b *Base) GetName(guild string, elem int) (string, error)

func (*Base) GetNames

func (b *Base) GetNames(items []int, guild string) ([]string, error)

func (*Base) Give

func (b *Base) Give(c sevcord.Ctx, opts []any)

func (*Base) IncrementCommandStat

func (b *Base) IncrementCommandStat(c sevcord.Ctx, name string)

func (*Base) Init

func (b *Base) Init()

func (*Base) IsPlayChannel

func (b *Base) IsPlayChannel(c sevcord.Ctx) bool

func (*Base) NameMap

func (b *Base) NameMap(items []int, guild string) (map[int]string, error)

func (*Base) PageLength

func (b *Base) PageLength(ctx sevcord.Ctx) int

func (*Base) SaveCombCache

func (b *Base) SaveCombCache(c sevcord.Ctx, comb types.CombCache)

func (*Base) SaveCommandStats

func (b *Base) SaveCommandStats(guild string, mem *types.ServerMem)

func (*Base) SaveStats

func (b *Base) SaveStats()

func (*Base) Stats

func (b *Base) Stats(c sevcord.Ctx, opts []any)

Jump to

Keyboard shortcuts

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