1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-15 08:16:17 +00:00

enable and disable threads

This commit is contained in:
mihalin
2022-02-19 20:40:56 +03:00
parent 64ba75e8cb
commit 715d516952
4 changed files with 39 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ async def message_handler(message: types.Message, *args, **kwargs):
text="Вы заблокированы в этом боте")
# Пересылаем сообщение в супер-чат
if is_super_group:
if is_super_group and bot.enable_threads:
thread_first_message = await _redis.get(_thread_uniqie_id(bot.pk, message.chat.id))
if thread_first_message:
# переслать в супер-чат, отвечая на предыдущее сообщение