components exist, use it :)

This commit is contained in:
ChomeNS 2022-11-17 09:22:47 +07:00
parent 122f7e55bc
commit 3c244904ef

View file

@ -116,27 +116,29 @@ function inject(bot) {
function toComponent() {
const component = [
'§8[§eChomeNS Bot§8] ',
{text: '[', color: 'dark_gray'},
{text: 'ChomeNS Bot', color: 'yellow'},
{text: '] ', color: 'dark_gray'},
{text: 'Now Playing', color: 'gold'},
' §8| ',
{text: ' | ', color: 'dark_gray'},
{text: bot.music.song.name, color: 'green'},
' §8| ',
{text: ' | ', color: 'dark_gray'},
{text: formatTime(time), color: 'gray'},
' §8/ ',
{text: ' / ', color: 'dark_gray'},
{text: formatTime(bot.music.song.length), color: 'gray'},
' §8| ',
{text: ' | ', color: 'dark_gray'},
{text: noteIndex, color: 'gray'},
'§8 / ',
{text: ' / ', color: 'dark_gray'},
{text: bot.music.song.notes.length, color: 'gray'},
];
if (bot.music.loop === 1) {
component.push(' §8| ');
component.push('§aLooping Current');
component.push({text: ' | ', color: 'dark_gray'});
component.push({text: 'Looping Current', color: 'green'});
}
if (bot.music.loop === 2) {
component.push(' §8| ');
component.push('§aLooping All');
component.push({text: ' | ', color: 'dark_gray'});
component.push({text: 'Looping All', color: 'green'});
}
return component;