add: store pranks

This commit is contained in:
2025-07-18 18:05:45 +05:00
parent d52d4dbf75
commit 7e4e2c0bad
7 changed files with 623 additions and 51 deletions

View File

@ -14,6 +14,8 @@ class CommandService:
"command": command_data.command,
"server_ip": command_data.server_ip,
"require_online_player": command_data.require_online_player,
"target_message": command_data.target_message if hasattr(command_data, 'target_message') else None,
"global_message": command_data.global_message if hasattr(command_data, 'global_message') else None,
"created_at": datetime.now().isoformat()
}
print(f"[{datetime.now()}] Добавлена команда: {command_data.command} "
@ -26,7 +28,13 @@ class CommandService:
try:
# Получаем команды для указанного сервера
commands = [
{"id": cmd_id, "command": cmd["command"], "require_online_player": cmd["require_online_player"]}
{
"id": cmd_id,
"command": cmd["command"],
"require_online_player": cmd["require_online_player"],
"target_message": cmd.get("target_message"),
"global_message": cmd.get("global_message")
}
for cmd_id, cmd in pending_commands.items()
if cmd["server_ip"] == server_ip
]