Changed the file structure to make the command reading process clearer and improve organization

This commit is contained in:
ION606
2022-05-13 22:29:54 +03:00
parent 21040344ae
commit 2e6d41e76b
14 changed files with 13 additions and 38 deletions
+23
View File
@@ -0,0 +1,23 @@
const hastebin = require("hastebin-gen");
module.exports ={
name: "scrape",
description: ".....",
async execute(message, args, Discord, Client, bot) {
const axios = require('axios');
const cheerio = require('cheerio')
const url = args[0];
axios(url)
.then(async response => {
const html = response.data;
const $ = cheerio.load(html);
//lyrics = $('.para_row').text();
const haste = await hastebin(html, { extension: "txt" });
message.channel.send(haste);
// console.log(lyrics);
})
.catch(console.error);
}
}
//TEST: https://www.karaoketexty.cz/texty-pisni/zoegirl/plain-170199