Describe the bug:
query and queryFull not resolving an object, making node.js hang. I tried this using both the address of my server, and the address of Hypixel (which is referenced in the example) and both have the same result, never resolving a response. I'm not sure this is just an issue with how it's being implemented, although I have used both the documentation and examples to derive what I have, and it's not working.
Code:
// This is a snippet from my Discord bot's '?mcserver info' command.
async info(message, Discord) {
let embed = new Discord.MessageEmbed();
let queryMessage = await message.reply(`Querying Minecraft server ${address}...`);
mcserver.queryFull(address)
.then(response => {
queryMessage.delete();
embed.setTitle('Minecraft Server Information')
.setColor('#42cef5')
.setDescription(response.description.descriptionText)
.addFields([{
name: 'Online Players:',
value: `${response.onlinePlayers} / ${response.maxPlayers}`
},
{
name: 'Version:',
value: response.version
},
{
name: 'Server Address:',
value: `${response.host}:${response.port}`
},
{
name: 'Round Trip Latency:',
value: response.roundTripLatency
}]);
console.log(response)
message.channel.send(embed);
})
.catch(error => console.error(error));
},
Expected behavior:
The method is supposed to return a response object from the server, which would then be used to format and send a message embed in the Discord server.
Additional context
Add any other context about the problem here
After looking in the Discord server, some people were saying that this feature was broken in version 3.5.1 (which is the default version on npm), so downgrading to version 3.4.4 fixes my issues.
Describe the bug: query and queryFull not resolving an object, making node.js hang. I tried this using both the address of my server, and the address of Hypixel (which is referenced in the example) and both have the same result, never resolving a response. I'm not sure this is just an issue with how it's being implemented, although I have used both the documentation and examples to derive what I have, and it's not working.
Code:
Expected behavior: The method is supposed to return a response object from the server, which would then be used to format and send a message embed in the Discord server.
Additional context Add any other context about the problem here