import_facts.js
function processLine (line, callback) {
	var trigger = line[0];

	// Required to drop the args to callback so async doesn't think we're throwing an error.
	function cb () {
		callback();
	}

	if (trigger === 'alias') {
		bot.db.schemas.factTrigger.saveAlias(line[1], line[2]).then(cb);
	} else {
		bot.db.schemas.factTrigger.saveFactoid(trigger, line[1], line[2]).then(cb);
	}
}
function processLine (line, callback) {
	var trigger = line[0];

	// Required to drop the args to callback so async doesn't think we're throwing an error.
	function cb () {
		callback();
	}

	if (trigger === 'alias') {
		bot.db.schemas.factTrigger.saveAlias(line[1], line[2]).then(cb);
	} else {
		bot.db.schemas.factTrigger.saveFactoid(trigger, line[1], line[2]).then(cb);
	}
}
function processLine ( line , callback ) { var trigger = line [ 0 ] ; // Required to drop the args to callback so async doesn't think we're throwing an error. function cb ( ) { callback ( ) ; } if ( trigger === 'alias' ) { bot . db . schemas . factTrigger . saveAlias ( line [ 1 ] , line [ 2 ] ) . then ( cb ) ; } else { bot . db . schemas . factTrigger . saveFactoid ( trigger , line [ 1 ] , line [ 2 ] ) . then ( cb ) ; } }
Function to process a single line. Since we need these to happen strictly in sequence, so we can get aliases matched, we need to mix Q and async.
Function to process a single line . Since we need these to happen strictly in sequence so we can get aliases matched we need to mix Q and async .