added query command

This commit is contained in:
Expand 2023-12-18 00:03:43 +11:00
parent cbbb1bab06
commit 71294988a0
2 changed files with 3 additions and 5 deletions

View file

@ -15,7 +15,7 @@ module.exports = {
*/
async execute(interaction) {
const { member, guild, options } = interaction
await interaction.deferReply({ ephemeral: true }).catch(err => console.error(`There was a problem deferring an interaction: `, err));
await interaction.deferReply({ ephemeral: false }).catch(err => console.error(`There was a problem deferring an interaction: `, err));
const rcon = new Rcon({
host: `${process.env.MCHOST}`,
port: parseInt(process.env.RCON_PORT),

View file

@ -22,8 +22,6 @@ module.exports = {
function runevery30seconds(i) {
setTimeout(() => {
dig.query({
type: 'minecraft',
host: process.env.MCHOST,
@ -43,7 +41,7 @@ module.exports = {
channelSend(`Server offline for ~${serverofflinefor}`)
}
if(serverofflinefor == 60 && restarted != 1){
channelSend(`server Offline for 60 seconds Restarting`)
channelSend(`Server Offline for 60 seconds Restarting`)
const killer = await spawn("screen", ['-XS', 'minecraft', 'quit'])
const mc = await spawn("screen", ['-dmS', 'minecraft', '/bin/bash', `${process.env.SERSTARTLOC}/ServerStart.sh`], {
cwd: `${process.env.SERSTARTLOC}`