Working MySQL Storage system
- testing delete
This commit is contained in:
31
commands/remove.js
Normal file
31
commands/remove.js
Normal 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());
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user