aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/myLogs.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-10-03 22:57:40 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-10-03 22:57:40 -0400
commit612ed820a0600ec11ed642005377cd7f5a8a8b77 (patch)
tree6bca4e7268fd0063ff53cf64fa44df62a23dba50 /src/commands/moderation/myLogs.ts
parented98ff7e2679f362f2657e77a6cf8dd3ce9b3d43 (diff)
downloadtanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.tar.gz
tanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.tar.bz2
tanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.zip
wip
Diffstat (limited to 'src/commands/moderation/myLogs.ts')
-rw-r--r--src/commands/moderation/myLogs.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/moderation/myLogs.ts b/src/commands/moderation/myLogs.ts
index 8faca8c..e3f5f10 100644
--- a/src/commands/moderation/myLogs.ts
+++ b/src/commands/moderation/myLogs.ts
@@ -12,7 +12,7 @@ import {
import { ApplicationCommandOptionType } from 'discord.js';
import { input, sanitizeInputForDiscord } from '../../../lib/utils/Format.js';
-import ModlogCommand from './modlog.js';
+import { generateModlogInfo, modlogSeparator } from './modlog.js';
export default class MyLogsCommand extends BotCommand {
public constructor() {
super('myLogs', {
@@ -50,14 +50,14 @@ export default class MyLogsCommand extends BotCommand {
const logs = await ModLog.findAll({
where: {
guild: guild.id,
- user: message.author.id
+ user: message.author.id,
+ pseudo: false,
+ hidden: false
},
order: [['createdAt', 'ASC']]
});
- const niceLogs = logs
- .filter((log) => !log.pseudo && !log.hidden)
- .map((log) => ModlogCommand.generateModlogInfo(log, false, true));
+ const niceLogs = logs.map((log) => generateModlogInfo(log, false, true));
if (niceLogs.length < 1) return message.util.reply(`${emojis.error} You don't have any modlogs in ${input(guild.name)}.`);
@@ -65,7 +65,7 @@ export default class MyLogsCommand extends BotCommand {
const embedPages = chunked.map((chunk) => ({
title: `Your Modlogs in ${sanitizeInputForDiscord(guild.name)}`,
- description: chunk.join(ModlogCommand.separator),
+ description: chunk.join(modlogSeparator),
color: colors.default
}));