forked from embee/woomy
		
	Merge pull request #23 from AStainlessSteelSink/master
Bind to SIGINT so Ctrl+C properly shuts down the bot
This commit is contained in:
		
						commit
						9326a2da3e
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		
							
								
								
									
										6
									
								
								index.js
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								index.js
									
										
									
									
									
								
							| 
						 | 
					@ -97,4 +97,10 @@ const init = async () => {
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					process.on('SIGINT', function(){
 | 
				
			||||||
 | 
					  client.logger.info("Disconnecting...")
 | 
				
			||||||
 | 
					  client.destroy();
 | 
				
			||||||
 | 
					  process.exit();
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
init();
 | 
					init();
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue