add: store pranks
This commit is contained in:
@ -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
|
||||
]
|
||||
|
Reference in New Issue
Block a user