diff --git a/index.js b/index.js index 5c1dde0..bb85f28 100644 --- a/index.js +++ b/index.js @@ -46,7 +46,7 @@ async function getCurrentSong() { const sortedPlayers = players.sort((a, b) => new Date(a.playFirstSeenAt).getTime() - new Date(b.playFirstSeenAt).getTime()); // default string - let nowPlaying = ""; + let nowPlaying = "Nothing Playing"; // if a player exists, get it's song if (sortedPlayers.length !== 0) { @@ -96,7 +96,6 @@ async function initTelegram() { return client; } - // store client here const tg = await initTelegram(); @@ -104,7 +103,6 @@ const tg = await initTelegram(); if (!!tg) { let song = ""; - setInterval(async () => { const newSong = await getCurrentSong(); if (newSong === song) return; // don't do API calls if the song is the same as it was @@ -112,8 +110,6 @@ if (!!tg) { console.log(`new song: ${song}`); - const ytURL = await getYoutube(song); - // update bio with new song tg.invoke(new TgApi.account.UpdateProfile({ about: songPrefix + song