Version 2.0.2 - Fix et Ajout de design

This commit is contained in:
2024-02-22 19:54:50 +01:00
parent bf50cc0881
commit ea01d5f318
14 changed files with 173 additions and 89 deletions

View File

@ -203,6 +203,7 @@ function startErelaManager(dlog, config) {
client.manager.on("playerDestroy",async (player) => {
await list.addCurrentToPrevious()
await list.destroy()
await client.channels.fetch(player.options.voiceChannel).then(channel => {
plog.log("Player supprimé dans : " + channel.name)

View File

@ -19,8 +19,7 @@ const markdownit = require("markdown-it")({
typographer: true
})
const Lyrics = require('song-lyrics-api');
const lyrics = new Lyrics();
module.exports.WebServer = class {
@ -479,13 +478,19 @@ function IOConnection(io) {
})
PostRequest("LYRICS", async (data) => {
lyrics.getLyrics(data)
.then((response) => {
PostAnswer("LYRICS", response[0].lyrics)
let url = `https://paxsenixofc.my.id/server/getLyricsMusix.php?q=${data}&type=default`;
fetch(url, {
method: 'GET',
})
.then(response => response.text())
.then(data => {
PostAnswer("LYRICS", data)
})
.catch((error) => {
PostAnswer("LYRICS", null)
})
console.error('Erreur:', error);
});
})
@ -558,7 +563,7 @@ function IOConnection(io) {
})