forked from Muzifs/LGBot
added sending logs to the admin chat
This commit is contained in:
@@ -4,6 +4,8 @@ import asyncio
|
||||
import logging
|
||||
from database import db
|
||||
|
||||
from action_reporter import action_reporter
|
||||
|
||||
from config import COMMAND_MESSAGES
|
||||
|
||||
logger = logging.getLogger(__name__) # Получаем логгер для текущего модуля
|
||||
@@ -159,6 +161,15 @@ def register_handlers(bot: AsyncTeleBot): # Регистрирует все об
|
||||
user_id=target_user.id,
|
||||
permissions=permissions
|
||||
)
|
||||
|
||||
# Отправляем лог в админ-чат
|
||||
await action_reporter.log_action(
|
||||
action="РАЗМУТ",
|
||||
user_id=target_user.id,
|
||||
admin_id=message.from_user.id,
|
||||
reason=None,
|
||||
duration=None
|
||||
)
|
||||
|
||||
# Отправляем сообщения, что пользователь получил размут
|
||||
await send_message(chat_id, COMMAND_MESSAGES['unmuted'])
|
||||
|
Reference in New Issue
Block a user