MOTD done right?

This commit is contained in:
Christopher Cookman 2024-07-02 21:09:04 -06:00
parent e16894a831
commit 96d86d0f88
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -103,6 +103,8 @@ client.on('interactionCreate', async interaction => {
doAddressHistory(interaction.user.id, address);
findMc(address, 5000).then((data) => {
data.description = filterMOTD(data.description);
motd = `\`${data.description.split("\n")[0]}\``
if (data.description?.split("\n")[1]) motd += "\n" + `\`${data.description.split("\n")[1]}\``
msgData = {
embeds: [{
title: `Server Info for ${address}`,
@ -120,7 +122,7 @@ client.on('interactionCreate', async interaction => {
},
{
name: "MOTD",
value: `\`${`\`${data.description?.split("\n")[0]}\`` || ""}\`\n${`\`${data.description?.split("\n")[1]}\`` || ""}`
value: motd
},
data.players.sample?.length > 0 ? {
name: "Players",