mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2025-01-03 15:55:42 +00: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.roles = ['Admins', 'Moderators'];
|
||||||
exports.command = function(message) {
|
exports.command = function(message) {
|
||||||
message.mentions.users.map((user) => {
|
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) {
|
if (count != null && count.length > 0) {
|
||||||
count.forEach(warning => warning.cleared = true);
|
count.forEach(warning => warning.cleared = true);
|
||||||
data.flushWarnings();
|
data.flushWarnings();
|
||||||
|
|
Loading…
Reference in a new issue