From dd8fc1a7f4c169f80e793764cebdc3dfc4cb2e44 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Wed, 21 Dec 2022 09:09:55 -0700 Subject: [PATCH] anonradio: fix edit spam from timestamp try 2 --- src/modules/anonradio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/anonradio.js b/src/modules/anonradio.js index 987fa0e..d0a5943 100644 --- a/src/modules/anonradio.js +++ b/src/modules/anonradio.js @@ -108,7 +108,7 @@ async function updateNowPlaying() { const thread = hf.bot.guilds.get(GUILD_ID)?.threads.get(THREAD_ID); if (thread) { const msg = await thread.getMessage(MESSAGE_ID); - const oldContent = msg.content.replace(/\n/,""); + const oldContent = msg.content.replace(//,"").trim(); if (oldContent !== content) { await thread.editMessage(MESSAGE_ID, {content: timestamp + "\n" + content}); }