From 78b617f0209ef15c24090bcb0a4e5c1a42c3bee4 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Wed, 21 Dec 2022 09:05:10 -0700 Subject: [PATCH] anonradio: dont do on ready actually, cant reload --- src/modules/anonradio.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/anonradio.js b/src/modules/anonradio.js index e36336e..2669798 100644 --- a/src/modules/anonradio.js +++ b/src/modules/anonradio.js @@ -105,7 +105,7 @@ async function updateNowPlaying() { const timestamp = ``; const content = `${timestamp}\n${title}\n${subtitle}\n${openmicTime}`.trim(); - const thread = hf.bot.guilds.get(GUILD_ID).threads.get(THREAD_ID); + const thread = hf.bot.guilds.get(GUILD_ID)?.threads.get(THREAD_ID); if (thread) { const msg = await thread.getMessage(MESSAGE_ID); if (msg.content !== content) { @@ -115,9 +115,7 @@ async function updateNowPlaying() { hf.__anonradio_timeout = setTimeout(updateNowPlaying, 2000); } -hf.bot.once("ready", () => { - updateNowPlaying(); -}); +updateNowPlaying(); /*hf.timer.add( "anonradio",