Documentation ¶
Index ¶
- Constants
- func AIReply(ctx *zero.Ctx, question string) message.Message
- func AddDialogueCollection(groupID int64, dc *DialoguesCollection)
- func DIYDialogue(ctx *zero.Ctx, question string) message.Message
- func DeleteDialogue(groupID int64, question string) error
- func GetAllQuestion(groupID int64) []string
- func GetDialogue(ctx *zero.Ctx, groupID int64, question string) message.Message
- func GetDialogueByFilesRandom(ctx *zero.Ctx, groupID int64, question string) message.Message
- func GetSpecQuestion(groupID int64, index int) string
- func IDoNotKnow(ctx *zero.Ctx, question string) message.Message
- func LoadDialoguesFromDir(dir string)
- func PluginName(ctx *zero.Ctx, question string) message.Message
- func SetDialogue(groupID int64, question string, answer message.Message) error
- func WhoAreYou(ctx *zero.Ctx, question string) message.Message
- type Dealer
- type DialoguesCollection
- type GroupChatDialogue
Constants ¶
View Source
const DIYDialogueLevelKey = "diylevel"
Variables ¶
This section is empty.
Functions ¶
func AddDialogueCollection ¶ added in v0.1.4
func AddDialogueCollection(groupID int64, dc *DialoguesCollection)
AddDialogueCollection 以 DialoguesCollection 的形式添加问答集,仅在本次运行中生效
func DIYDialogue ¶
DIYDialogue Dealer: 用户自定义对话
func DeleteDialogue ¶
DeleteDialogue 根据问题删除一个问答
func GetDialogue ¶
GetDialogue 根据群号和问题获取answer消息
func GetDialogueByFilesRandom ¶ added in v0.1.2
GetDialogueByFilesRandom 随机获取一条答句(来自文件)消息
func GetSpecQuestion ¶ added in v0.2.0
GetSpecQuestion 获取GetAllQuestion中的qs[i]问句
func IDoNotKnow ¶
IDoNotKnow Dealer: XX不知道
func LoadDialoguesFromDir ¶ added in v0.1.2
func LoadDialoguesFromDir(dir string)
LoadDialoguesFromDir 从文件夹中读取问答集
func PluginName ¶ added in v0.1.1
PluginName Dealer: 问题为插件名,返回帮助信息
func SetDialogue ¶
SetDialogue 新增或修改一个问答
Types ¶
type DialoguesCollection ¶ added in v0.1.4
type DialoguesCollection struct {
// contains filtered or unexported fields
}
DialoguesCollection 一个问答集
func ParseDialoguesFile ¶ added in v0.1.2
func ParseDialoguesFile(filename string) (dc *DialoguesCollection, err error)
ParseDialoguesFile 解析问答集文件
func (*DialoguesCollection) AutoSeparateReg ¶ added in v0.1.4
func (dc *DialoguesCollection) AutoSeparateReg() error
AutoSeparateReg 自动从全匹配map中分离出正则
func (DialoguesCollection) Length ¶ added in v0.1.4
func (dc DialoguesCollection) Length() int
Length 获取问答集的问句个数
func (DialoguesCollection) Load ¶ added in v0.1.4
func (dc DialoguesCollection) Load(question string) []string
Load 获取答句列表
func (*DialoguesCollection) Merge ¶ added in v0.1.4
func (dc *DialoguesCollection) Merge(another *DialoguesCollection)
Merge 与另一问答集合并
type GroupChatDialogue ¶
Click to show internal directories.
Click to hide internal directories.