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