mirror of
https://github.com/awfufu/go-hurobot.git
synced 2026-03-01 13:39:42 +08:00
18 lines
309 B
Go
18 lines
309 B
Go
package main
|
|
|
|
import (
|
|
"go-hurobot/cmds"
|
|
"go-hurobot/config"
|
|
"go-hurobot/qbot"
|
|
)
|
|
|
|
func messageHandler(c *qbot.Client, msg *qbot.Message) {
|
|
if msg.UserID != config.BotID {
|
|
isCommand := cmds.HandleCommand(c, msg)
|
|
if !isCommand {
|
|
go customReply(c, msg)
|
|
}
|
|
go qbot.SaveDatabase(msg, isCommand)
|
|
}
|
|
}
|