// Package robot -----------------------------
// @file      : replyRuler.go
// @author    : JJXu
// @contact   : wavingbear@163.com
// @time      : 2025/6/13 17:39
// -------------------------------------------
package robot

import (
	"fonchain-fiee/api/accountFiee"
	"fonchain-fiee/pkg/common/ws"
)

// 回复规则
type Reply struct {
	Title    string
	Response string
	Rules    []IRobotTask
}

func (r *Reply) Hit(event ws.ListenEventData, robotInfo *accountFiee.ChatUserData) (hit bool, rule IRobotTask) {
	for _, rule = range r.Rules {
		hit = rule.Hit(event, robotInfo)
		if hit {
			return
		}
	}
	return
}