From 9aa9511fd741f04fadbb15e22b225c6dd00e4e57 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 3 Jun 2023 14:58:42 -0400 Subject: [PATCH] Misc updates --- main.js | 2 +- modules/functions.js | 4 ++-- slash-commands/relay.js | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 67ee99c..9be859f 100755 --- a/main.js +++ b/main.js @@ -109,7 +109,7 @@ client.on('messageCreate', async message => { // Break the message down into its components and analyze it const commandData = fn.dotCommands.getCommandData(message); - if (isDev) console.log(commandData); + // if (isDev) console.log(commandData); if (commandData.isValid && commandData.isCommand && (message.author.id == process.env.ownerId)) { try { diff --git a/modules/functions.js b/modules/functions.js index f9aa9de..a37a508 100755 --- a/modules/functions.js +++ b/modules/functions.js @@ -238,10 +238,10 @@ const functions = { const commandData = {}; // Split the message content at the final instance of a period const finalPeriod = message.content.lastIndexOf('.'); - if(isDev) console.log(message.content); + // if(isDev) console.log(message.content); // If the final period is the last character, or doesn't exist if (finalPeriod < 0) { - if (isDev) console.log(finalPeriod); + // if (isDev) console.log(finalPeriod); commandData.isCommand = false; return commandData; } diff --git a/slash-commands/relay.js b/slash-commands/relay.js index 0283a43..2382d9d 100755 --- a/slash-commands/relay.js +++ b/slash-commands/relay.js @@ -114,6 +114,8 @@ module.exports = { let query = guildInfo.queryBuilder("setReminders"); // Run the query await dbfn.setGuildInfo(query); + // Refresh the collection + await fn.collectionBuilders.guildInfos(interaction.client); // Create a messageCollector on the watch channel fn.collectors.create(interaction.client, guildInfo); // Compose a reply @@ -150,6 +152,8 @@ module.exports = { let query = guildInfo.queryBuilder("setReminders"); // Run the query await dbfn.setGuildInfo(query); + // Refresh the collection + await fn.collectionBuilders.guildInfos(interaction.client); // Create a messageCollector on the watch channel fn.collectors.create(interaction.client, guildInfo); // Compose a reply @@ -173,6 +177,8 @@ module.exports = { interaction.client.guildInfos.set(interaction.guildId, guildInfo); // Update the database await dbfn.setGuildInfo(guildInfo.queryBuilder("setReminders")).catch(e => console.error(e)); + // Refresh the collection + await fn.collectionBuilders.guildInfos(interaction.client); // Close the collector await fn.collectors.end(interaction.client, guildInfo).catch(e => console.error(e)); // Reply confirming disabling of relay