Files
go-hurobot/handlers.go
2025-03-04 01:49:33 +08:00

16 lines
341 B
Go

package main
import "go-hurobot/qbot"
func onGroupMessage(c *qbot.Client, msg qbot.GroupMessage) {
if msg.RawMessage == "hello" {
c.SendGroupMsg(msg.GroupID, "world", false)
}
}
func onPrivateMessage(c *qbot.Client, msg qbot.PrivateMessage) {
if msg.RawMessage == "hello" {
c.SendPrivateMsg(msg.Sender.UserID, "world", false)
}
}