Working MySQL Storage system

- testing delete
This commit is contained in:
Logan Cusano
2023-02-20 00:20:46 -05:00
parent 18b960231d
commit 1e6d60f4c3
7 changed files with 253 additions and 222 deletions

31
commands/remove.js Normal file
View File

@@ -0,0 +1,31 @@
var libFlayer = require("../libFlayer.js");
module.exports = {
name: 'add',
description: 'Add RSS Source',
execute(message, args) {
try {
if (args.length < 1) {
message.reply(`Please use in !add [title] format`);
return;
}
var title = args[0];
libFlayer.deleteSource(title, link, category, (err, result) => {
console.log("Result from adding entry", result);
if (result) {
message.reply(`Adding ${title} to the list of RSS sources`);
} else {
message.reply(`${title} already exists in the list of RSS sources`);
}
var sources = libFlayer.getSources();
libFlayer.loadFeeds();
});
} catch (err) {
console.log(err);
message.reply(err.toString());
}
}
};