Misc updates

This commit is contained in:
Skylar Grant 2023-06-03 14:58:42 -04:00
parent 79821d7abc
commit 9aa9511fd7
3 changed files with 9 additions and 3 deletions

View File

@ -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 {

View File

@ -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;
}

View File

@ -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