fix: 修改触发词
This commit is contained in:
parent
97234edda8
commit
2290146862
@ -7,14 +7,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
handler.RegisterHandler("getweb", getweb)
|
handler.RegisterHandler("上网", getweb)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getweb(msg model.Message) (reply model.Reply) {
|
func getweb(msg model.Message) (reply model.Reply) {
|
||||||
if len(msg.RawMsg) <= len("getweb ") {
|
if len(msg.RawMsg) <= len("上网 ") {
|
||||||
return model.Reply{}
|
return model.Reply{}
|
||||||
}
|
}
|
||||||
url := msg.RawMsg[len("getweb "):]
|
url := msg.RawMsg[len("上网 "):]
|
||||||
if err := util.ScreenshotURL(url, "./tmp/getweb/url.png", 1920, 1080, 0, 0, 0, 0, ""); err != nil {
|
if err := util.ScreenshotURL(url, "./tmp/getweb/url.png", 1920, 1080, 0, 0, 0, 0, ""); err != nil {
|
||||||
return model.Reply{
|
return model.Reply{
|
||||||
ReplyMsg: err.Error(),
|
ReplyMsg: err.Error(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user