1
0
mirror of https://github.com/fumiama/ReiBot.git synced 2026-06-07 01:50:24 +08:00

fix cbq permission & add more cbq engine

This commit is contained in:
源文雨
2022-10-06 12:37:10 +08:00
parent 42013713d4
commit 60552ff07d
4 changed files with 387 additions and 100 deletions

View File

@@ -73,7 +73,7 @@ func (tc *TelegramClient) processEvent(update tgba.Update) {
}
func match(ctx *Ctx, matchers []*Matcher) {
if ctx.Message != nil {
if ctx.Message != nil && ctx.Event.Type == "Message" {
// Caption也当作消息处理
if ctx.Message.Text == "" && ctx.Message.Caption != "" {
ctx.Message.Text = ctx.Message.Caption
@@ -81,7 +81,7 @@ func match(ctx *Ctx, matchers []*Matcher) {
log.Println("cpoy Message Caption to Text:", ctx.Message.Text)
}
}
if ctx.Message != nil && ctx.Message.Text != "" { // 确保无空
if ctx.Message != nil && ctx.Event.Type == "Message" && ctx.Message.Text != "" { // 确保无空
ctx.IsToMe = func(ctx *Ctx) bool {
if ctx.Message.Chat.IsPrivate() {
log.Debugln("[event] private event")