This commit is contained in:
Expand-sys 2024-02-08 20:44:19 +11:00
parent f0fe76df4d
commit 84659f3ecd

View file

@ -2,7 +2,7 @@ const { CommandInteraction, ApplicationCommandType, ApplicationCommandOptionType
const { sendResponse, sendReply, channelSend } = require('../../../utils/utils'); const { sendResponse, sendReply, channelSend } = require('../../../utils/utils');
const path = require('path'); const path = require('path');
const { Rcon } = require("rcon-client"); const { Rcon } = require("rcon-client");
const dig = require("gamedig") import { GameDig } from gamedig
module.exports = { module.exports = {
@ -16,7 +16,7 @@ module.exports = {
async execute(interaction) { async execute(interaction) {
const { member, guild, options } = interaction const { member, guild, options } = interaction
await interaction.deferReply({ ephemeral: false }).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));
dig.query({ GameDig.query({
type: 'minecraft', type: 'minecraft',
host: process.env.MCHOST, host: process.env.MCHOST,
port: process.env.MCHOSTPORT, port: process.env.MCHOSTPORT,