From be6ab3092985d41ae5a955c1e6a942c3984e78d2 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 20 Oct 2019 17:11:36 +0800 Subject: [PATCH] update msg len for parsing rules --- bot.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bot.go b/bot.go index d3f5354..348611c 100644 --- a/bot.go +++ b/bot.go @@ -553,6 +553,16 @@ func botListParsingRules(m *tb.Message) { for _, v := range msgParsingRules { s = fmt.Sprintf("%s[%d] %s\n", s, v.ID, v.Description) + if len(s) > 3000 { + c := TGCommand{ + Type: commandReplyMsg, + Text: s, + FromMsgID64: int64(m.ID), + FromChatID64: m.Chat.ID, + } + TGCmdQueue <- c + s = nil + } } c := TGCommand{