1
0
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:
源文雨
2022-06-11 00:55:16 +08:00
parent 6d9724e8f5
commit cc43153a54
6 changed files with 53 additions and 27 deletions

View File

@@ -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)
}
},
},