Misc updates
This commit is contained in:
		
							parent
							
								
									ae6758a7b3
								
							
						
					
					
						commit
						8da7740e7e
					
				
							
								
								
									
										2
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.js
									
									
									
									
									
								
							| @ -109,7 +109,7 @@ client.on('messageCreate', async message => { | |||||||
| 
 | 
 | ||||||
| 	// Break the message down into its components and analyze it
 | 	// Break the message down into its components and analyze it
 | ||||||
| 	const commandData = fn.dotCommands.getCommandData(message); | 	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)) { | 	if (commandData.isValid && commandData.isCommand && (message.author.id == process.env.ownerId)) { | ||||||
| 		try { | 		try { | ||||||
|  | |||||||
| @ -238,10 +238,10 @@ const functions = { | |||||||
| 			const commandData = {}; | 			const commandData = {}; | ||||||
| 			// Split the message content at the final instance of a period
 | 			// Split the message content at the final instance of a period
 | ||||||
| 			const finalPeriod = message.content.lastIndexOf('.'); | 			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 the final period is the last character, or doesn't exist
 | ||||||
| 			if (finalPeriod < 0) { | 			if (finalPeriod < 0) { | ||||||
| 				if (isDev) console.log(finalPeriod); | 				// if (isDev) console.log(finalPeriod);
 | ||||||
| 				commandData.isCommand = false; | 				commandData.isCommand = false; | ||||||
| 				return commandData; | 				return commandData; | ||||||
| 			} | 			} | ||||||
|  | |||||||
| @ -114,6 +114,8 @@ module.exports = { | |||||||
| 						let query = guildInfo.queryBuilder("setReminders"); | 						let query = guildInfo.queryBuilder("setReminders"); | ||||||
| 						// Run the query
 | 						// Run the query
 | ||||||
| 						await dbfn.setGuildInfo(query); | 						await dbfn.setGuildInfo(query); | ||||||
|  | 						// Refresh the collection
 | ||||||
|  | 						await fn.collectionBuilders.guildInfos(interaction.client); | ||||||
| 						// Create a messageCollector on the watch channel
 | 						// Create a messageCollector on the watch channel
 | ||||||
| 						fn.collectors.create(interaction.client, guildInfo); | 						fn.collectors.create(interaction.client, guildInfo); | ||||||
| 						// Compose a reply
 | 						// Compose a reply
 | ||||||
| @ -150,6 +152,8 @@ module.exports = { | |||||||
| 						let query = guildInfo.queryBuilder("setReminders"); | 						let query = guildInfo.queryBuilder("setReminders"); | ||||||
| 						// Run the query
 | 						// Run the query
 | ||||||
| 						await dbfn.setGuildInfo(query); | 						await dbfn.setGuildInfo(query); | ||||||
|  | 						// Refresh the collection
 | ||||||
|  | 						await fn.collectionBuilders.guildInfos(interaction.client); | ||||||
| 						// Create a messageCollector on the watch channel
 | 						// Create a messageCollector on the watch channel
 | ||||||
| 						fn.collectors.create(interaction.client, guildInfo); | 						fn.collectors.create(interaction.client, guildInfo); | ||||||
| 						// Compose a reply
 | 						// Compose a reply
 | ||||||
| @ -173,6 +177,8 @@ module.exports = { | |||||||
| 						interaction.client.guildInfos.set(interaction.guildId, guildInfo); | 						interaction.client.guildInfos.set(interaction.guildId, guildInfo); | ||||||
| 						// Update the database
 | 						// Update the database
 | ||||||
| 						await dbfn.setGuildInfo(guildInfo.queryBuilder("setReminders")).catch(e => console.error(e)); | 						await dbfn.setGuildInfo(guildInfo.queryBuilder("setReminders")).catch(e => console.error(e)); | ||||||
|  | 						// Refresh the collection
 | ||||||
|  | 						await fn.collectionBuilders.guildInfos(interaction.client); | ||||||
| 						// Close the collector
 | 						// Close the collector
 | ||||||
| 						await fn.collectors.end(interaction.client, guildInfo).catch(e => console.error(e)); | 						await fn.collectors.end(interaction.client, guildInfo).catch(e => console.error(e)); | ||||||
| 						// Reply confirming disabling of relay
 | 						// Reply confirming disabling of relay
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user