fix
This commit is contained in:
parent
333dc4a459
commit
7c8a0bc53b
@ -28,21 +28,27 @@ module.exports = {
|
|||||||
}, {
|
}, {
|
||||||
headers: headers
|
headers: headers
|
||||||
});
|
});
|
||||||
|
|
||||||
// Attendre un peu pour la sauvegarde
|
|
||||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
||||||
|
|
||||||
// Étape 2: Arrêter le serveur
|
|
||||||
await interaction.editReply('⏹️ Arrêt du serveur...');
|
|
||||||
await axios.post('https://panel.louismazin.ovh/api/client/servers/ae4a628f/command', {
|
await axios.post('https://panel.louismazin.ovh/api/client/servers/ae4a628f/command', {
|
||||||
command: 'shutdown 0'
|
command: "broadcast 'Redemarrage journalier du serveur (Ca prends 20 secondes)'"
|
||||||
}, {
|
}, {
|
||||||
headers: headers
|
headers: headers
|
||||||
});
|
});
|
||||||
|
|
||||||
// Étape 3: Attendre 5 secondes
|
// Attendre un peu pour la sauvegarde
|
||||||
await interaction.editReply('⏳ Attente de 5 secondes...');
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
||||||
|
// Étape 2: Arrêter le serveur
|
||||||
|
await interaction.editReply('⏹️ Arrêt du serveur...');
|
||||||
|
await axios.post('https://panel.louismazin.ovh/api/client/servers/ae4a628f/command', {
|
||||||
|
command: 'shutdown 1'
|
||||||
|
}, {
|
||||||
|
headers: headers
|
||||||
|
});
|
||||||
|
|
||||||
|
// Étape 3: Attendre 10 secondes
|
||||||
|
await interaction.editReply('⏳ Attente de 10 secondes...');
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 10000));
|
||||||
|
|
||||||
// Étape 4: Redémarrer le serveur
|
// Étape 4: Redémarrer le serveur
|
||||||
await interaction.editReply('🚀 Redémarrage du serveur...');
|
await interaction.editReply('🚀 Redémarrage du serveur...');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user