-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparole.js
36 lines (20 loc) · 853 Bytes
/
parole.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const {zokou} =require("../framework/zokou");
const axios =require("axios");
zokou({ nomCom: "lyrics",
reaction: "✨",
categorie: "Search" }, async (dest, zk, commandeOptions) => {
const { repondre, arg, ms } = commandeOptions;
try {
if (!arg || arg.length === 0) return repondre("Where is the name of musique");
let result = await axios.get(`https://vihangayt.me/search/lyrics?q=${arg.join(' ')}`);
let lyrics = result.data.data;
if (lyrics.error) return repondre("no lyrics found");
let msg = `---------Anyway-lyrics-finder--------
* *Artist :* ${lyrics.artist}
* *Title :* ${lyrics.title}
${lyrics.lyrics}`
zk.sendMessage(dest,{image : { url : './media/lyrics-img.jpg'} , caption : msg}, { quoted : ms });
} catch (err) {
repondre('Error')
}
})