Fixed list of warnings returning length instead of the actual list.

This commit is contained in:
chris062689 2017-01-29 15:45:50 -05:00
parent 0273e57e7f
commit 0a75dc0f70

View File

@ -5,7 +5,7 @@ var logger = require('../logging.js');
exports.roles = ['Admins', 'Moderators'];
exports.command = function(message) {
message.mentions.users.map((user) => {
var count = app.warnings.filter(x => x.id == user.id && !x.cleared).length;
var count = app.warnings.filter(x => x.id == user.id && !x.cleared);
if (count != null && count.length > 0) {
count.forEach(warning => warning.cleared = true);
data.flushWarnings();