Mostly cleaning and added the JSON to Map to Print function

This commit is contained in:
ION606
2022-07-16 19:26:06 +03:00
parent b9c4caa608
commit 34bbd823ab
13 changed files with 737 additions and 410 deletions
+2 -1
View File
@@ -211,7 +211,8 @@ function fromMessage(bot, command, msg) {
const message = msg.channel.messages.cache.get(data[2]);
// console.log(message);
var em = message.embeds[0];
var em;
if (message.embeds) { em = message.embeds[0]; }
var rows;
if (command == 'stop') {
+4 -1
View File
@@ -12,13 +12,16 @@ module.exports ={
const html = response.data;
const $ = cheerio.load(html);
//lyrics = $('.para_row').text();
const haste = await hastebin(html, { extension: "txt" });
message.channel.send(haste);
message.channel.send(haste);
// console.log(lyrics);
})
.catch(function(err) {
if (err.message.indexOf('The "url" argument must be of type string') != -1) {
message.reply("The URL should be a string!");
} else if (err.code == 'ERR_BAD_REQUEST') {
message.reply("404 link not valid!")
} else {
message.reply("Oops! There's been an error");
}