mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-11-24 14:15:40 +01:00
Fixed list of warnings returning length instead of the actual list.
This commit is contained in:
parent
0273e57e7f
commit
0a75dc0f70
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user