 				handleError(error, "while running \"\(command.message.content)\"")
 			}
 			self.runningCommands.remove(at: self.runningCommands.index {$0 === command}!)
-			if (self.pendingStopAction != .run) && self.runningCommands.isEmpty {
-				self.shutdownHandler(self.pendingStopAction == .reboot, self.pendingStopAction == .update)
+			if (self.pendingStopReason != nil) && self.runningCommands.isEmpty {
+				self.shutdownHandler(self.pendingStopReason!)
 			}
 		}
 	}

						var bestMatch: (score: Int, component: String, usageComponent: String)?
						
						for usageComponent in availableUsageComponents {
							if usageComponent == "*" || usageComponent == "..." {
								continue
							}
							
							for component in availableComponents {
								let distance = Levenshtein.distanceBetween(usageComponent, and: component)
								let componentScore = min(distance, usageComponent.characters.count)

			)]
		)
		
		if pendingStopReason == nil && lowercase.hasPrefix(shortName.lowercased()) {
			//do a more precise check so names like @FirstStep won't cause the bot to respond
			let name = self.name.lowercased().unicodeScalars
			
