bot-utilities
Advanced tools
Comparing version 2.3.0 to 2.4.0
'use strict'; | ||
var exit = require('exit'); | ||
exports.exit = require('exit'); | ||
var _ = require('lodash'); | ||
@@ -54,9 +54,7 @@ | ||
exports.randomCommand = function (command) { | ||
exports.randomCommand = function (command, percentage) { | ||
return function (options) { | ||
if (options.random) { | ||
if (_.percentChance(98)) { | ||
console.log('Skipping...'); | ||
exit(0); | ||
if (_.percentChance(percentage || 98)) { | ||
return exports.exit(0); | ||
} | ||
@@ -63,0 +61,0 @@ } |
{ | ||
"name": "bot-utilities", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Utilities for Twitter bots.", | ||
@@ -5,0 +5,0 @@ "main": "bot-utilities.js", |
Sorry, the diff of this file is not supported yet
14617
15
182