misc.mcserver: add tcpshield footer cause why not

This commit is contained in:
Cynthia Foxwell 2024-08-02 13:00:01 -06:00
parent e5f4df6333
commit adf80c3f1a

View file

@ -242,7 +242,11 @@ mcserver.callback = async function (msg, line) {
await msg.removeReaction("\uD83C\uDFD3");
return `Failed to query:\n\`\`\`\n${data.error.message}\n\`\`\``;
} else {
if (data.version.name == "TCPShield.com") data = await queryServerNoIdent(ip, port);
let tcpshield = false;
if (data.version.name == "TCPShield.com") {
data = await queryServerNoIdent(ip, port);
tcpshield = true;
}
await msg.removeReaction("\uD83C\uDFD3");
@ -284,6 +288,9 @@ mcserver.callback = async function (msg, line) {
thumbnail: image && {
url: "attachment://icon.png",
},
footer: {
text: tcpshield && "Server uses TCPShield",
},
},
file: image && {
file: image,