Update self-term
This commit is contained in:
		
							parent
							
								
									8e244a203e
								
							
						
					
					
						commit
						23d989cd59
					
				
							
								
								
									
										5
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								index.js
									
									
									
									
									
								
							|  | @ -148,7 +148,10 @@ client.on('messageCreate', async (message) => { | |||
| 	}).then((data) => { | ||||
| 		output = data.data.choices[0].message; | ||||
| 		output.name = "Bot"; | ||||
| 		if (output.content == "!!!TERM1234!!!") { // This can allow a self-termination command
 | ||||
| 		if (output.content.endsWith("!!!TERM1234!!!")) { // This can allow a self-termination command
 | ||||
| 			output.content = output.content.replace("!!!TERM1234!!!", ""); | ||||
| 			clearInterval(typing); | ||||
| 			message.channel.send(output.content); | ||||
| 			resetSession(message.channelId); | ||||
| 			return message.channel.send(lang.terminated); | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue