Added kareoki. No search function though

This commit is contained in:
ION606
2022-03-10 20:30:03 -05:00
parent 8d1d633703
commit cdacc6c03e
6 changed files with 1261 additions and 19 deletions
+26
View File
@@ -0,0 +1,26 @@
module.exports ={
name: 'kareoke',
description: 'Sing your least-favorite song with you favorite person, me!',
execute(message, args) {
const axios = require('axios');
const cheerio = require('cheerio')
const url = args[0];
if (args[0] == undefined) {
message.channel.send("Please pick out a song at https://www.karaoke-lyrics.net/\nThe command should look like\n/kareoke [link_here]");
} else {
axios(url)
.then(response => {
const html = response.data;
const $ = cheerio.load(html);
lyrics = $('.para_row').text();
breakbar = "---------------------------------------------";
message.channel.send(breakbar + "\n" + lyrics + "\n" + breakbar);
//console.log(lyrics);
})
.catch(console.error);
}
}
}
//TEST: https://www.karaoketexty.cz/texty-pisni/zoegirl/plain-170199
+1 -1
View File
@@ -11,7 +11,7 @@ module.exports = {
.addFields(
{name: 'My Epithets:', value: "Pearls of Wisdom"},
{name: '\t1. ', value: "Negative money is the best money"},
{name: '\t2. ', value: "Ukrane"}
{name: '\t2. ', value: "There is no god, only logic"}
);
message.channel.send({ embeds: [newEmbed] });
+21
View File
@@ -0,0 +1,21 @@
module.exports ={
name: "scraper",
description: ".....",
execute(message, args) {
const axios = require('axios');
const cheerio = require('cheerio')
const url = args[0];
axios(url)
.then(response => {
const html = response.data;
const $ = cheerio.load(html);
lyrics = $('.para_row').text();
//message.channel.send(lyrics);
console.log(lyrics);
})
.catch(console.error);
}
}
//TEST: https://www.karaoketexty.cz/texty-pisni/zoegirl/plain-170199