highlights

package
v0.0.0-...-2935971 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: BSD-2-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = &module.Module{
	Name: "highlights",

	Config: &config,

	DgoHandlers: []interface{}{
		onGuildCreate,
		messageCreate,
		onMemberCreate,
		onMemberLeave,
	},

	Commands: []*drc.Command{
		cConf,
		cAdmin,
		cMod,
		cHighlight,
		{Name: "hl", AliasText: []string{"highlight"}},
	},

	InitFunc: func(*module.Module) error {
		return nil
	},
	OpenFunc: func(m *module.Module) error {
		db.s = enpsql.GetSession()
		return nil
	},
	CloseFunc: func(*module.Module) {
	},
}

Module はエンコのmodule

Functions

func NormaliseSpaces

func NormaliseSpaces(s string) string

NormaliseSpaces turns all whitespace characters into the same space and strips out any multiples

func NormaliseString

func NormaliseString(s string) string

NormaliseString runs all the normalisation functions used currently, it does the following - converts to lowercase - Normalises all equivalent characters using unicode NFKC - Strips successive spaces and converts all space characters to be the same

Types

type Database

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

Database .

type Highlight

type Highlight struct {
	UserID        string
	Enabled       bool
	Highlights    []string
	ChannelBlocks []string
	UserBlocks    []string
}

Highlight .

Jump to

Keyboard shortcuts

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