CoolFace
Apppublic

AstroGato1427/neco-bot

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
test_encoding.js20 linesDownload Raw Back to root
1const axios = require('axios');2 3async function testLavalink() {4    try {5        const query = 'ytsearch:"Usted ya no quiere estar aquí", Chef Benito';6        const url = `http://localhost:2333/v4/loadtracks?identifier=${encodeURIComponent(query)}`;7        const res = await axios.get(url, { headers: { Authorization: "youshallnotpass" } });8        console.log("Lavalink Response:");9        if (res.data && res.data.data && res.data.data.length > 0) {10            console.log("Found:", res.data.data[0].info.title);11        } else {12            console.log(JSON.stringify(res.data, null, 2));13        }14    } catch (e) {15        console.error("Error:", e.message);16    }17}18 19testLavalink();20