hoshino

package
v0.0.0-...-81d5470 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NickName       []string `yaml:"nickname"`
	CommandPrefix  string   `yaml:"command_prefix"`
	SuperUsers     []string `yaml:"super_users"`
	ExpireDuration int      `yaml:"expire_duration"`
	AccessToken    string   `yaml:"access_token"`
	Host           string   `yaml:"host"`
	Port           int      `yaml:"port"`
}
var HsoConfig Config

type MatcherWrapper

type MatcherWrapper struct {
	sync.RWMutex
	*zero.Matcher
	// contains filtered or unexported fields
}

func (*MatcherWrapper) Finish

func (mw *MatcherWrapper) Finish(ctx *zero.Ctx, message interface{})

func (*MatcherWrapper) FinishChain

func (mw *MatcherWrapper) FinishChain(ctx *zero.Ctx, message ...message.MessageSegment)

func (*MatcherWrapper) Got

func (mw *MatcherWrapper) Got(key, prompt string, handler zero.Handler) *MatcherWrapper

func (*MatcherWrapper) Handle

func (mw *MatcherWrapper) Handle(handler zero.Handler) *MatcherWrapper

func (*MatcherWrapper) Ok

func (mw *MatcherWrapper) Ok() *MatcherWrapper

func (*MatcherWrapper) SetArgParser

func (mw *MatcherWrapper) SetArgParser(parser zero.Handler) *MatcherWrapper

func (*MatcherWrapper) SetBlock

func (mw *MatcherWrapper) SetBlock(block bool) *MatcherWrapper

func (*MatcherWrapper) SetPriority

func (mw *MatcherWrapper) SetPriority(Pri int) *MatcherWrapper

type Service

type Service struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func Lookup

func Lookup(service string) (*Service, bool)

func NewService

func NewService(name string, enableOnDefault bool) *Service

func (*Service) Disable

func (sv *Service) Disable(groupID int64)

func (*Service) Enable

func (sv *Service) Enable(groupID int64)

func (*Service) On

func (sv *Service) On(typ string, rules ...zero.Rule) *MatcherWrapper

func (*Service) OnCommandGroup

func (sv *Service) OnCommandGroup(commands []string, rules ...zero.Rule) *MatcherWrapper

Jump to

Keyboard shortcuts

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