Improved function to work with updated storage
This commit is contained in:
@@ -30,20 +30,19 @@ module.exports = {
|
||||
|
||||
if (!category) category = "ALL";
|
||||
|
||||
libCore.addSource(title, link, category, interaction.guildId, interaction.channelId, (err, result) => {
|
||||
console.log("Result from adding entry", result);
|
||||
await libCore.addSource(title, link, category, interaction.guildId, interaction.channelId, (err, result) => {
|
||||
log.DEBUG("Result from adding entry", result);
|
||||
|
||||
if (result) {
|
||||
interaction.reply(`Adding ${title} to the list of RSS sources`);
|
||||
} else {
|
||||
interaction.reply(`${title} already exists in the list of RSS sources`);
|
||||
}
|
||||
|
||||
libCore.loadFeeds();
|
||||
});
|
||||
}catch(err){
|
||||
log.ERROR(err)
|
||||
await message.reply(err.toString());
|
||||
await interaction.reply(err.toString());
|
||||
}
|
||||
libCore.loadFeeds();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user