diff --git a/src/modules/misc.js b/src/modules/misc.js index c6d0187..12d752d 100644 --- a/src/modules/misc.js +++ b/src/modules/misc.js @@ -758,18 +758,20 @@ mcserver.callback = async function (msg, line) { const ip = split[0]; const port = split[1] ?? 25565; + await msg.addReaction("\uD83C\uDFD3"); + const data = await new Promise((resolve, reject) => { logger.verbose("mcserver", "querying", ip, port); const timeout = setTimeout(() => { logger.verbose("mcserver", "timeout"); resolve("timeout"); - }, 10000); + }, 60000); const client = net.createConnection( { host: ip, port: port, - timeout: 10000, + timeout: 60000, }, function () { logger.verbose("mcserver", "connect"); @@ -803,8 +805,11 @@ mcserver.callback = async function (msg, line) { }); if (data == "timeout") { + await msg.removeReaction("\uD83C\uDFD3"); return "Timed out trying to query."; } else { + await msg.removeReaction("\uD83C\uDFD3"); + const motd = data.description.text.replace( /\u00a7([a-f0-9k-or])/gi, (formatting) => {