changed
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const { server_ip, server_port } = require('../../config.json');
|
const { server_ip } = require('../../config.json');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
@@ -8,7 +8,7 @@ module.exports = {
|
|||||||
.setDescription('Get the current server status and players'),
|
.setDescription('Get the current server status and players'),
|
||||||
|
|
||||||
async execute(interaction) {
|
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) => {
|
axios.get(`https://api.mcsrvstat.us/3/${SERVER_IP}`).then((resp) => {
|
||||||
const data = resp.data;
|
const data = resp.data;
|
||||||
|
|||||||
6
config.json.example
Normal file
6
config.json.example
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"clientId":"your bots application id",
|
||||||
|
"token":"your bot token",
|
||||||
|
|
||||||
|
"server_ip":"127.0.0.1:12345"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user