anonradio: fix edit spam from timestamp try 2

This commit is contained in:
Cynthia Foxwell 2022-12-21 09:09:55 -07:00
parent 99c89bd7e7
commit dd8fc1a7f4
1 changed files with 1 additions and 1 deletions

View File

@ -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(/<t:\d+:T>\n/,"");
const oldContent = msg.content.replace(/<t:\d+:T>/,"").trim();
if (oldContent !== content) {
await thread.editMessage(MESSAGE_ID, {content: timestamp + "\n" + content});
}