app

package
v0.0.0-...-fb8d844 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QABasicSrvPoll = map[uint64]*Question{} // QABasicSrvPoll 问答基本服务线程池

Functions

func DoWordSplit

func DoWordSplit(s string) (words []string, err error)

func HashForSHA1

func HashForSHA1(d string) string

HashForSHA1 SHA1 散列

Types

type App

type App struct {
	Cli *qq.Rina // Cli QQ 客户端

	DB *database.Database // DB 数据库
	// contains filtered or unexported fields
}
var AC *App

func New

func New(qc chan *Question, wc chan *qq.Msg) (app *App)

New 新建一个机器人

func (*App) PrepareQA

func (a *App) PrepareQA(i uint32) (err error)

PrepareQA 使用 i:问题ID(ID) 准备作答

func (*App) ReadMemInfo

func (a *App) ReadMemInfo(i uint64) []*memInfo

ReadMemInfo 使用 i:群ID(ID) 读取群成员信息

func (*App) ReadQuestion

func (a *App) ReadQuestion(i uint32) (q *Question, err error)

ReadQuestion 使用 i:问题ID(ID) 读取问答信息

func (*App) StartQA

func (a *App) StartQA(i uint32) (err error)

StartQA 使用 i:问题ID(ID) 开始作答

func (*App) StopQA

func (a *App) StopQA(i uint32) (err error)

StopQA 使用 i:问题ID(ID) 停止问答

type Question

type Question struct {
	*database.QuestionListTab
	Mems      []*memInfo                `json:"mems"`
	GroupName string                    `json:"group_name"`
	Answer    []*database.AnswerListTab `json:"answer"`
}

Question 问题

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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