feature/restart-dayz-server
This commit is contained in:
2 files changed
+18
-1
No files matched your search
@@ -136,6 +136,11 @@ module.exports = {
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
}, {
|
||||||
|
name: "restart",
|
||||||
|
description: "Restart the DayZ Server",
|
||||||
|
value: "restart",
|
||||||
|
type: 1,
|
||||||
}],
|
}],
|
||||||
SlashCommand: {
|
SlashCommand: {
|
||||||
/**
|
/**
|
||||||
@@ -400,6 +405,18 @@ module.exports = {
|
|||||||
|
|
||||||
return interaction.send({ embeds: [successEmbed] });
|
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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayz-armbands",
|
"name": "dayz-armbands",
|
||||||
"version": "8.9.0",
|
"version": "8.10.0",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
Reference in new issue
Block a user