feature/restart-dayz-server

This commit is contained in:
SowinskiBraeden committed 2023-08-31 13:22:12 -07:00
1 parent 76f99c36b1
commit c9ad3ff2b6
2 files changed
+18 -1

No files matched your search

+17
View File
@@ -136,6 +136,11 @@ module.exports = {
required: true,
},
]
}, {
name: "restart",
description: "Restart the DayZ Server",
value: "restart",
type: 1,
}],
SlashCommand: {
/**
@@ -400,6 +405,18 @@ module.exports = {
return interaction.send({ embeds: [successEmbed] });
} else if (args[0].name == "restart") {
const res = await fetch(`https://api.nitrado.net/services/${client.config.Nitrado.ServerID}/gameservers/restart`, {
method: "POST"
headers: {
"Authorization": client.config.Nitrado.Auth,
}
}).then(response =>
response.json().then(data => data)
).then(res => res);
return interaction.send({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription('The server will restart shortly.')], flags: (1 << 6) });
}
}
},
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dayz-armbands",
"version": "8.9.0",
"version": "8.10.0",
"description": "A General Purpose Discord Bot for DayZ Servers.",
"main": "index.js",
"nodemonConfig": {