Auto commit: 2026-02-19T20:13:01.432Z

This commit is contained in:
Flatlogic Bot 2026-02-19 20:13:01 +00:00
parent ceada41f52
commit d9d6f803b0
3 changed files with 35 additions and 2 deletions

View File

@ -63,6 +63,9 @@ if ($method === 'GET') {
if ($msg['username'] === 'Lili Bot 🤖') {
$msg['level_color'] = '#00e676';
$msg['level_emoji'] = '🤖';
} elseif ($msg['username'] === 'Sistema') {
$msg['level_color'] = '#facc15';
$msg['level_emoji'] = '📢';
} elseif ($isDjDay) {
$msg['level_color'] = '#facc15';
$msg['level_emoji'] = '🎧';

View File

@ -38,7 +38,7 @@ try {
// Announce in chat
$chatMsg = "🚨 [DJ INVITADO] **$username** ha usado su poder para SALTAR la canción actual. ⏭️";
$stmt = $db->prepare("INSERT INTO messages (username, message, type) VALUES ('Sistema', ?, 'text')");
$stmt = $db->prepare("INSERT INTO messages (username, message, type) VALUES ('Sistema', ?, 'dj_power')");
$stmt->execute([$chatMsg]);
echo json_encode(['success' => true, 'message' => 'Acción de saltar ejecutada y anunciada']);
@ -59,7 +59,7 @@ try {
if ($req) {
$chatMsg = "🔥 [DJ INVITADO] **$username** ha PRIORIZADO la canción: **{$req['artist']} - {$req['song']}**. ¡Sonará muy pronto! 🎵";
$stmt = $db->prepare("INSERT INTO messages (username, message, type) VALUES ('Sistema', ?, 'text')");
$stmt = $db->prepare("INSERT INTO messages (username, message, type) VALUES ('Sistema', ?, 'dj_power')");
$stmt->execute([$chatMsg]);
}

View File

@ -1702,6 +1702,12 @@ $twitter_link = "https://twitter.com/";
</div>
<style>
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes shake {
10%, 90% { transform: translate3d(-1px, 0, 0); }
20%, 80% { transform: translate3d(2px, 0, 0); }
30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
40%, 60% { transform: translate3d(4px, 0, 0); }
}
</style>
<div class="app-container">
@ -2302,6 +2308,7 @@ $twitter_link = "https://twitter.com/";
<audio id="radio-audio" src="https://listen.radioking.com/radio/828046/stream/897251" preload="none" crossorigin="anonymous"></audio>
<audio id="welcome-sound" src="https://assets.mixkit.co/active_storage/sfx/2013/2013-preview.mp3" preload="none"></audio>
<audio id="pop-sound" src="https://assets.mixkit.co/active_storage/sfx/2354/2354-preview.mp3" preload="none"></audio>
<audio id="dj-power-sound" src="https://assets.mixkit.co/active_storage/sfx/2862/2862-preview.mp3" preload="none"></audio>
<script>
const isAdmin = <?php echo isset($_GET['admin']) && $_GET['admin'] === '1' ? 'true' : 'false'; ?>;
@ -2855,6 +2862,22 @@ $twitter_link = "https://twitter.com/";
const currentUserName = document.getElementById('user-name').value.trim() || 'Anónimo';
chatMessages.innerHTML = '';
messages.forEach((msg, index) => {
// Play DJ Power sound for new dj_power messages
if (msg.type === 'dj_power' && index >= lastMessageCount && lastMessageCount > 0) {
const powerSound = document.getElementById('dj-power-sound');
if (powerSound) {
powerSound.currentTime = 0;
powerSound.volume = 0.5;
powerSound.play().catch(e => console.log('DJ Power sound blocked:', e));
}
// Also trigger a small shake on the whole app for impact
document.body.style.animation = 'none';
setTimeout(() => {
document.body.style.animation = 'shake 0.5s cubic-bezier(.36,.07,.19,.97) both';
}, 10);
}
const div = document.createElement('div');
const isLike = msg.message.includes('❤️');
const isMe = msg.username.toLowerCase() === currentUserName.toLowerCase();
@ -2876,6 +2899,13 @@ $twitter_link = "https://twitter.com/";
div.style.background = "rgba(0, 230, 118, 0.05)";
}
if (msg.type === 'dj_power') {
div.style.background = "linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(245, 158, 11, 0.1))";
div.style.border = "1px solid #facc15";
div.style.boxShadow = "0 0 15px rgba(250, 204, 21, 0.3)";
div.style.animation = "toast-in-out 0.5s forwards, pulse 2s infinite";
}
if (isLike) {
div.style.background = isMe ? 'rgba(255, 68, 68, 0.25)' : 'rgba(255, 68, 68, 0.15)';
div.style.borderLeft = isMe ? 'none' : '4px solid #ff4444';