Files
goodBaby/drivers/onebot/runner.go
T

22 lines
398 B
Go
Raw Normal View History

2026-06-19 18:47:36 +08:00
package onebot
import (
2026-07-26 22:19:41 +08:00
"context"
"log"
"github.com/ssdomei232/goodBaby/model"
)
// OneBotExecutor OneBot执行器
type OneBotExecutor struct{}
func (e *OneBotExecutor) GetType() string {
2026-07-26 22:19:41 +08:00
return RuleType
}
2026-07-26 22:19:41 +08:00
func (e *OneBotExecutor) Execute(ctx context.Context, rule *model.Rule) error {
log.Printf("执行OneBot规则: %s (ID: %d)", rule.Name, rule.ID)
2026-07-26 22:19:41 +08:00
return SendOneBotMsg(ctx, rule)
}