chat

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DIYDialogue

func DIYDialogue(ctx *zero.Ctx, question string) message.Message

DIYDialogue Dealer: 用户自定义对话

func DeleteDialogue

func DeleteDialogue(groupID int64, question string) error

DeleteDialogue 根据问题删除一个问答

func GetAllQuestion

func GetAllQuestion(groupID int64) []string

GetAllQuestion 获取指定个群可以触发的所有问答的问题

func GetDialogue

func GetDialogue(groupID int64, question string) message.Message

GetDialogue 根据群号和问题获取answer消息

func IDoNotKnow

func IDoNotKnow(ctx *zero.Ctx, question string) message.Message

IDoNotKnow Dealer: XX不知道

func SetDialogue

func SetDialogue(groupID int64, question string, answer message.Message) error

SetDialogue 新增或修改一个问答

func WhoAreYou

func WhoAreYou(ctx *zero.Ctx, question string) message.Message

WhoAreYou Dealer: 自我介绍

Types

type Dealer

type Dealer func(ctx *zero.Ctx, question string) message.Message

type GroupChatDialogue

type GroupChatDialogue struct {
	GroupID  int64  `gorm:"column:group_id;primaryKey;autoIncrement:false"`
	Question string `gorm:"column:question;primaryKey;autoIncrement:false"`
	Answer   string `gorm:"column:answer"`
}

Jump to

Keyboard shortcuts

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