Add some debug logs
This commit is contained in:
		
							parent
							
								
									34ae082235
								
							
						
					
					
						commit
						32ece5f64d
					
				
							
								
								
									
										1
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								index.js
									
									
									
									
									
								
							|  | @ -149,6 +149,7 @@ client.on('messageCreate', async (message) => { | ||||||
| 		output = data.data.choices[0].message; | 		output = data.data.choices[0].message; | ||||||
| 		output.name = "Bot"; | 		output.name = "Bot"; | ||||||
| 		if (output.content.endsWith("!!!TERM1234!!!")) { // This can allow a self-termination command
 | 		if (output.content.endsWith("!!!TERM1234!!!")) { // This can allow a self-termination command
 | ||||||
|  | 			console.log(`${colors.cyan("[INFO]")} Self termination command detected in ${colors.green(message.channel.name)} (${colors.green(message.channelId)}): ${colors.green(message.content)}`) | ||||||
| 			output.content = output.content.replace("!!!TERM1234!!!", ""); | 			output.content = output.content.replace("!!!TERM1234!!!", ""); | ||||||
| 			clearInterval(typing); | 			clearInterval(typing); | ||||||
| 			if (output.content.length != 0) message.channel.send(output.content); | 			if (output.content.length != 0) message.channel.send(output.content); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue