mirror of
https://github.com/fumiama/ReiBot.git
synced 2026-06-05 17:10:25 +08:00
extend regex to callbackquery
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
rei "github.com/fumiama/ReiBot"
|
||||
tgba "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -28,7 +28,7 @@ func main() {
|
||||
}
|
||||
_, err := bot.Send(tgba.NewMessage(msg.Chat.ID, msg.Text[len("测试"):]))
|
||||
if err != nil {
|
||||
log.Println("[ERRO]", err)
|
||||
log.Errorln(err)
|
||||
}
|
||||
},
|
||||
OnEditedMessage: func(updateid int, bot *rei.TelegramClient, msg *tgba.Message) {
|
||||
@@ -40,7 +40,7 @@ func main() {
|
||||
}
|
||||
_, err := bot.Send(tgba.NewMessage(msg.Chat.ID, "已编辑:"+msg.Text[len("测试"):]))
|
||||
if err != nil {
|
||||
log.Println("[ERRO]", err)
|
||||
log.Errorln(err)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user