mirror of
https://github.com/awfufu/go-hurobot.git
synced 2026-03-01 13:39:42 +08:00
16 lines
341 B
Go
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)
|
|
}
|
|
}
|