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

Caption也当作消息处理

This commit is contained in:
源文雨
2022-10-05 12:27:24 +08:00
parent 2e46786889
commit 985217f276

View File

@@ -73,6 +73,13 @@ func (tc *TelegramClient) processEvent(update tgba.Update) {
}
func match(ctx *Ctx, matchers []*Matcher) {
if ctx.Message != nil {
// Caption也当作消息处理
if ctx.Message.Text == "" && ctx.Message.Caption != "" {
ctx.Message.Text = ctx.Message.Caption
ctx.Message.Entities = ctx.Message.CaptionEntities
}
}
if ctx.Message != nil && ctx.Message.Text != "" { // 确保无空
ctx.IsToMe = func(ctx *Ctx) bool {
if ctx.Message.Chat.IsPrivate() {