From 37fe31b4817b772594f55520a8c47aecff7a3e2a Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Thu, 1 Apr 2021 11:23:27 +0300 Subject: [PATCH] twitter mode --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f0b2c94..e38cf0e 100755 --- a/main.py +++ b/main.py @@ -276,7 +276,10 @@ def _process_message(bot: Bot, m: Message): m.reply_text('Добро пожаловать (debug)') else: _notify_access_request(bot, m.from_user) - return m.reply_text('Пожалуйста, обратитесь к @lono_contactbot') + return m.reply_text('Пожалуйста, GTFO') + + if m.text and len(m.text) > 140 or m.caption and len(m.caption) > 140: + return m.reply_text('Сообщение не может содержать более 140 символов') text = _sign_text(m.text_html, m, MAX_MESSAGE_LENGTH) caption = _sign_text(m.caption_html, m, MAX_CAPTION_LENGTH)