From 45a27904bd83098445274ed3fc342325190ee2e4 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 24 Apr 2016 00:14:54 +0000 Subject: [PATCH] changes --- modules/dice/dice.js | 3 ++- modules/kick/commands.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/dice/dice.js b/modules/dice/dice.js index e4d7c9e..0a8be52 100644 --- a/modules/dice/dice.js +++ b/modules/dice/dice.js @@ -74,7 +74,8 @@ var dice = function(dbot) { event.reply(rolls[i][0] + ": invalid dice spec"); } else { if (rolls[i][1].length > 1) { - var total = " (total " + rolls[i][1].sum(); + console.log(rolls); + var total = " (total " + _.reduce(rolls[i][1], function(memo, num){ return memo + num; }, 0); if (rolls[i][2] != 0) { if (rolls[i][2] > 0) { total += " + "; diff --git a/modules/kick/commands.js b/modules/kick/commands.js index cf209d1..082e646 100644 --- a/modules/kick/commands.js +++ b/modules/kick/commands.js @@ -425,7 +425,7 @@ var commands = function(dbot) { commands['~ckick'].regex = /^ckick (#[^ ]+ )?([^ ]+) ?(.*)?$/; commands['~nban'].regex = /^nban (\d[\d\.dhmsy]+)? ?([^ ]+) (.+)$/; - commands['~quiet'].regex = /^quiet (\d[\d\.hms]+)? ?(#[^ ]+ )?([^ ]+) ?(.*)?$/; + commands['~quiet'].regex = /^quiet (\d[\d\.hmsy]+)? ?(#[^ ]+ )?([^ ]+) ?(.*)?$/; commands['~timeout'].regex = /^timeout ([^ ]+) ?(.*)?$/; commands['~unquiet'].regex = /^unquiet (#[^ ]+ )?([^ ]+) ?$/; commands['~votequiet'].regex = [/^votequiet ([^ ]+) (.+)$/, 3];