From 4164138e84f4c4049dfe66e205dc2de763dc68ad Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 22 Sep 2020 15:17:41 -0400 Subject: [PATCH] fix modlogs --- src/commands/modlogs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/modlogs.ts b/src/commands/modlogs.ts index 10d552f..1f80e1d 100644 --- a/src/commands/modlogs.ts +++ b/src/commands/modlogs.ts @@ -16,7 +16,7 @@ export default class Modlogs extends Command { try { if (!args.length) return this.client.commands.get('help').run(message, [this.name]); const msg: Message = await this.loading(message.channel, 'Locating modlogs...'); - const query = await this.client.db.Moderation.find({ $or: [{ username: args.join(' ') }, { userID: args.filter((a) => a)[0].replace(/[<@!>]/g, '') }] }); + const query = await this.client.db.Moderation.find({ $or: [{ username: args.join(' ') }, { userID: args[0] }] }); if (!query.length) return msg.edit(`***${this.client.stores.emojis.error} Cannot locate modlogs for ${args.join(' ')}***`); const formatted = query.sort((a, b) => a.date.getTime() - b.date.getTime()).map((log) => {