Randomizing bot execution with randomizer

If you’re building a bot and would like a quick way to add some randomness to make it look less like a bot, check out the Randomizer library. Randomizer let’s you randomly decide when to execute a command based on a given probability.

For example, execute a command 3 out of 7 times:

var randomizer = new Randomizer();
randomizer.every(3).outOf(7).times.execute(function () {
  console.log('executing!');
});

You can also make it execute only during day time (your bot has to sleep no?)

randomizer.ifItsDayTime.every(3).outOf(7).times.execute(function () {
  console.log('executing!');
});

You can configure what is considered day time first:

Randomizer.defineDayTime({
  'from' : 6,
  'to'   : 22,
});
randomizer.ifItsNightTime.every(1).outOf(4).times.execute(function () {
  console.log('executing!');
});
Follow me for updates on similar new posts I write or tweet about this post.