forked from GitHub/dbot
		
	Enforce command.js being loaded. Still reloadable, but can't be omitted.
This commit is contained in:
		
							parent
							
								
									3824767ee3
								
							
						
					
					
						commit
						c852a4ada8
					
				
							
								
								
									
										5
									
								
								run.js
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								run.js
									
									
									
									
									
								
							| @ -107,6 +107,11 @@ DBot.prototype.reloadModules = function() { | ||||
|     this.timers.clearTimers(); | ||||
|     this.save(); | ||||
| 
 | ||||
|     // enforce having command. it can still be reloaded, but dbot _will not_ function without it, so not having it should be impossible
 | ||||
|     if(!this.moduleNames.include("command")) { | ||||
|         this.moduleNames.push("command"); | ||||
|     } | ||||
| 
 | ||||
|     // Reload Javascript snippets
 | ||||
|     var path = require.resolve('./snippets'); | ||||
|     delete require.cache[path]; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Psychedelic Squid
						Psychedelic Squid