-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3.html
26 lines (23 loc) · 960 Bytes
/
3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Status du Bot Discord</title>
</head>
<body>
<h1>Status du Bot : <span id="status">En attente...</span></h1>
<p>Dernière erreur : <span id="last_error">Aucune</span></p>
<p>Dernier redémarrage : <span id="last_restart">N/A</span></p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.0/socket.io.js"></script>
<script>
var socket = io();
socket.emit('get_status'); // Demander le statut initial du bot
socket.on('status_update', function(data) {
document.getElementById('status').innerText = data.status;
document.getElementById('last_error').innerText = data.last_error || "Aucune";
document.getElementById('last_restart').innerText = data.last_restart || "N/A";
});
</script>
</body>
</html>