diff --git a/src/modules/misc/mcserver.js b/src/modules/misc/mcserver.js index b84ee32..8594516 100644 --- a/src/modules/misc/mcserver.js +++ b/src/modules/misc/mcserver.js @@ -239,7 +239,11 @@ mcserver.callback = async function (msg, line) { await msg.removeReaction("\uD83C\uDFD3"); - const motd = data.description.text.replace(/\u00a7([a-f0-9k-or])/gi, (formatting) => { + const desc = + typeof data.description == "string" + ? data.description + : data.description?.text ?? ""; + const motd = desc.replace(/\u00a7([a-f0-9k-or])/gi, (formatting) => { const ansi = formattingToAnsi[formatting]; return ansi ? `\x1b[${ansi}m` : ""; });