From 96d86d0f88d18637dbf73686a3393acc6031fa73 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Tue, 2 Jul 2024 21:09:04 -0600 Subject: [PATCH] MOTD done right? --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 5cd0770..2812151 100644 --- a/index.js +++ b/index.js @@ -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",