tweak to history, bugfix to sending reply to dms
This commit is contained in:
parent
18fb92c3a0
commit
f08879a19d
@ -96,9 +96,13 @@
|
||||
"id-blacklist": "warn",
|
||||
"id-match": "warn",
|
||||
"implicit-arrow-linebreak": "warn",
|
||||
"indent": ["warn", 4, {
|
||||
"SwitchCase": 1
|
||||
}],
|
||||
"indent": [
|
||||
"warn",
|
||||
4,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"init-declarations": "warn",
|
||||
"quotes": [
|
||||
"error",
|
||||
@ -200,7 +204,10 @@
|
||||
"no-restricted-modules": "warn",
|
||||
"no-restricted-properties": "warn",
|
||||
"no-restricted-syntax": "warn",
|
||||
"no-return-assign": ["warn", "except-parens"],
|
||||
"no-return-assign": [
|
||||
"warn",
|
||||
"except-parens"
|
||||
],
|
||||
"no-return-await": "warn",
|
||||
"no-script-url": "warn",
|
||||
"no-self-compare": "warn",
|
||||
|
@ -10,7 +10,7 @@ import { APIEmbed, AttachmentBuilder, GuildChannel, User } from 'discord.js';
|
||||
import { Filter } from 'mongodb';
|
||||
|
||||
const Constants = {
|
||||
PageSize: 5,
|
||||
PageSize: 10,
|
||||
MaxCharacters: 256,
|
||||
MaxCharactersVerbose: 128 // Displays more information in the field, decreases characters.
|
||||
};
|
||||
@ -56,8 +56,9 @@ class HistoryCommand extends SlashCommand
|
||||
description: 'Amount of infractions to list per page',
|
||||
type: CommandOptionType.INTEGER,
|
||||
flag: true,
|
||||
maximum: 10,
|
||||
minimum: 1
|
||||
maximum: 25,
|
||||
minimum: 1,
|
||||
defaultValue: 10
|
||||
}, {
|
||||
name: 'page',
|
||||
description: 'Page to select',
|
||||
@ -221,8 +222,13 @@ class HistoryCommand extends SlashCommand
|
||||
|
||||
embed.fields!.push({
|
||||
name: `__**${infraction.type} \`[case-${infraction.case}]\`** *(${moment(infraction.timestamp).fromNow()})*__`,
|
||||
value: string
|
||||
value: string,
|
||||
inline: true
|
||||
});
|
||||
if (results.length <= 16 && i > 0 && i % 2 === 1)
|
||||
embed.fields!.push({
|
||||
name: ZeroWidthChar, value: ZeroWidthChar, inline: true
|
||||
});
|
||||
}
|
||||
|
||||
if (long)
|
||||
|
@ -259,10 +259,10 @@ class InvokerWrapper<InGuild extends boolean = boolean, HasCommand extends boole
|
||||
if (options.dm)
|
||||
{
|
||||
this.#pending = await this.author.send(options);
|
||||
await this.#target.reply({
|
||||
content: ':thumbsup:',
|
||||
ephemeral: true
|
||||
});
|
||||
if (this.deferred && !this.replied)
|
||||
await this.#target.editReply({ content: ':thumbsup:' });
|
||||
else
|
||||
await this.#target.reply({ content: ':thumbsup:' });
|
||||
return this.#pending;
|
||||
}
|
||||
|
||||
|
@ -339,7 +339,7 @@ switch({old}) {
|
||||
}
|
||||
|
||||
[COMMAND_HISTORY_SUCCESS]
|
||||
Fetched the {type} moderation cases {targets}.
|
||||
Fetched the {type} moderation cases {targets}
|
||||
|
||||
[COMMAND_HISTORY_FAILTOOLONG]
|
||||
Failed to display cases in one embed, try a smaller page size.
|
||||
|
Loading…
Reference in New Issue
Block a user