Compare commits
No commits in common. "lyrics-fix" and "main" have entirely different histories.
lyrics-fix
...
main
1 changed files with 2 additions and 8 deletions
|
@ -91,7 +91,6 @@ export default {
|
|||
|
||||
const player = useMainPlayer();
|
||||
const queue = useQueue(interaction.guildId!);
|
||||
|
||||
if (request) {
|
||||
if (
|
||||
interaction.options.getSubcommand() ===
|
||||
|
@ -109,10 +108,9 @@ export default {
|
|||
} else if (queue) {
|
||||
const track = queue.history.currentTrack;
|
||||
if (track) {
|
||||
request = track.cleanTitle + " " + queue.history.currentTrack?.author;
|
||||
try {
|
||||
data = await player.lyrics.search({
|
||||
q: request,
|
||||
q: track.cleanTitle + " " + queue.history.currentTrack?.author,
|
||||
});
|
||||
} catch {
|
||||
return await interaction.followUp(`❌ | ${loc.get("c_lyrics2")} \`${track.title}\``);
|
||||
|
@ -198,11 +196,7 @@ export default {
|
|||
return await interaction.followUp(loc.get("c_lyrics8"));
|
||||
}
|
||||
|
||||
if (data) {
|
||||
if (data.length === 0 || (data.length > 0 && data[0].plainLyrics !== null)) {
|
||||
return await interaction.followUp(`❌ | ${loc.get("c_lyrics2")} \`${request}\``);
|
||||
}
|
||||
|
||||
if (data && data.length > 0 && data[0].plainLyrics !== null) {
|
||||
const title = data[0];
|
||||
const limit_desc = 4096;
|
||||
const nb_embed = Math.ceil(title.plainLyrics.length / limit_desc);
|
||||
|
|
Loading…
Reference in a new issue