From 5152eb38342cdb8c1a8e9ad32790088d038adba3 Mon Sep 17 00:00:00 2001 From: valentijn <120188387+HerpieDerpieee@users.noreply.github.com> Date: Thu, 4 Jan 2024 19:57:40 +0100 Subject: [PATCH] changed --- commands/mc/status.js | 4 ++-- config.json.example | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 config.json.example diff --git a/commands/mc/status.js b/commands/mc/status.js index 27a3e51..80c5861 100644 --- a/commands/mc/status.js +++ b/commands/mc/status.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js'); const axios = require('axios'); -const { server_ip, server_port } = require('../../config.json'); +const { server_ip } = require('../../config.json'); module.exports = { data: new SlashCommandBuilder() @@ -8,7 +8,7 @@ module.exports = { .setDescription('Get the current server status and players'), async execute(interaction) { - const SERVER_IP = `${server_ip}:${server_port}`; + const SERVER_IP = `${server_ip}`; axios.get(`https://api.mcsrvstat.us/3/${SERVER_IP}`).then((resp) => { const data = resp.data; diff --git a/config.json.example b/config.json.example new file mode 100644 index 0000000..7df9571 --- /dev/null +++ b/config.json.example @@ -0,0 +1,6 @@ +{ + "clientId":"your bots application id", + "token":"your bot token", + + "server_ip":"127.0.0.1:12345" +} \ No newline at end of file