diff --git a/discordBot/commands/rssAdd.mjs b/discordBot/commands/rssAdd.mjs index 33aefec..83eac64 100644 --- a/discordBot/commands/rssAdd.mjs +++ b/discordBot/commands/rssAdd.mjs @@ -54,18 +54,19 @@ export const execute = async (nodeIo, interaction) => { var category = interaction.options.getString('category'); if (!category) category = "ALL"; + await interaction.reply(`Adding ${title} to the list of RSS sources, please wait...`); await addSource(title, link, category, interaction.guildId, interaction.channelId, (err, result) => { log.DEBUG("Result from adding entry", result); if (result) { - interaction.reply(`Successfully added ${title} to the list of RSS sources`); + interaction.editReply(`Successfully added ${title} to the list of RSS sources`); } else { - interaction.reply(`${title} already exists in the list of RSS sources`); + interaction.editReply(`${title} already exists in the list of RSS sources`); } }); } catch (err) { log.ERROR(err) - await interaction.reply(err.toString()); + await interaction.editReply(err.toString()); } } \ No newline at end of file diff --git a/discordBot/commands/rssRemove.mjs b/discordBot/commands/rssRemove.mjs index 1e40593..1528252 100644 --- a/discordBot/commands/rssRemove.mjs +++ b/discordBot/commands/rssRemove.mjs @@ -42,17 +42,17 @@ export async function autocomplete(nodeIo, interaction) { export const execute = async (nodeIo, interaction) => { try { var title = interaction.options.getString('title'); - interaction.reply(`Removing ${title} from the list of RSS sources, please wait...`); + await interaction.reply(`Removing ${title} from the list of RSS sources, please wait...`); const results = await deleteFeedByTitle(title); if (!results) { log.WARN(`Failed to remove source: ${title}`); - interaction.editReply(`Failed to remove source: '${title}'`); + await interaction.editReply(`Failed to remove source: '${title}'`); return; } - interaction.editReply(`${title} was successfully removed from the RSS sources.`) + await interaction.editReply(`${title} was successfully removed from the RSS sources.`) } catch (err) { log.ERROR(err) - interaction.editReply(err.toString()); + await interaction.editReply(err.toString()); } } \ No newline at end of file diff --git a/discordBot/commands/rssTrigger.mjs b/discordBot/commands/rssTrigger.mjs index a18880b..f3ac0f6 100644 --- a/discordBot/commands/rssTrigger.mjs +++ b/discordBot/commands/rssTrigger.mjs @@ -38,6 +38,7 @@ export const execute = async (nodeIo, interaction) => { //await interaction.reply(`**Online Sockets: '${sockets}'**`); await interaction.reply('Triggering RSS update'); await updateFeeds(interaction.client); + await interaction.editReply('RSS Update Completed'); //await interaction.channel.send('**Pong.**'); } catch (err) { console.error(err); diff --git a/rss-manager/sourceManager.mjs b/rss-manager/sourceManager.mjs index 643bb3f..6b7ce5d 100644 --- a/rss-manager/sourceManager.mjs +++ b/rss-manager/sourceManager.mjs @@ -1,3 +1,5 @@ +import { DebugBuilder } from "../modules/debugger.mjs"; +const log = new DebugBuilder("server", "sourceManager"); import { createFeed, getFeedByLink, deleteFeedByLink } from '../modules/mongo-wrappers/mongoFeedsWrappers.mjs'; class SourceManager {