some cleanup
Deploy / Deploy (push) Successful in 1m28s Details

This commit is contained in:
Rik Berkelder 2025-01-15 02:52:54 +01:00
parent 993bb89daa
commit a48454f96b
1 changed files with 1 additions and 5 deletions

View File

@ -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