Implement volume control #830 (#994)

Co-authored-by: Max Isom <hi@maxisom.me>
This commit is contained in:
Matt Foxx 2024-03-12 22:25:45 -04:00 committed by GitHub
parent 786e6fd8f5
commit 6baaffb730
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 141 additions and 11 deletions

View file

@ -44,10 +44,11 @@ const getPlayerUI = (player: Player) => {
const position = player.getPosition();
const button = player.status === STATUS.PLAYING ? '⏹️' : '▶️';
const progressBar = getProgressBar(15, position / song.length);
const progressBar = getProgressBar(10, position / song.length);
const elapsedTime = song.isLive ? 'live' : `${prettyTime(position)}/${prettyTime(song.length)}`;
const loop = player.loopCurrentSong ? '🔂' : player.loopCurrentQueue ? '🔁' : '';
return `${button} ${progressBar} \`[${elapsedTime}]\` 🔉 ${loop}`;
const vol: string = typeof player.getVolume() === 'number' ? `${player.getVolume()!}%` : '';
return `${button} ${progressBar} \`[${elapsedTime}]\`🔉 ${vol} ${loop}`;
};
export const buildPlayingMessageEmbed = (player: Player): EmbedBuilder => {