forked from GitHub/dbot
rookie mistake
This commit is contained in:
parent
f4a203e416
commit
badf17b0ec
@ -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'));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user