From badf17b0ec9e99662f69ced6d23adf908e6afa5b Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 19 Feb 2016 19:17:05 +0000 Subject: [PATCH] rookie mistake --- modules/warning/warning.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/warning/warning.js b/modules/warning/warning.js index 07167d2..3613668 100644 --- a/modules/warning/warning.js +++ b/modules/warning/warning.js @@ -83,8 +83,9 @@ var warning = function(dbot) { var sTimes = _.keys(warns).sort(function(a, b) { return parseInt(a) - parseInt(b); }); + event.reply(_.keys(sTimes)); - if(index < sTimes.length && index > 0) { + if(index <= sTimes.length && index >= 0) { this.db.del('notifies', warns[sTimes[index]], function(err) { event.reply(dbot.t('warning_removed')); });