3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00

more fixes

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-11 15:13:49 +00:00 committed by GitHub
parent e48ca5c075
commit 7c5e6eb91f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 51 additions and 45 deletions

View file

@ -1,4 +1,4 @@
import { MessageEmbedOptions, User } from "discord.js";
import { EmbedData, MessageCreateOptions, User } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage } from "../../../pluginUtils";
import { emptyEmbedValue, resolveUser, trimLines } from "../../../utils";
@ -54,7 +54,7 @@ export const CasesModCmd = modActionsCmd({
const lastCaseNum = page * casesPerPage;
const title = `Most recent cases ${firstCaseNum}-${lastCaseNum} of ${totalCases} by ${modName}`;
const embed: MessageEmbedOptions = {
const embed: EmbedData = {
author: {
name: title,
iconURL: mod instanceof User ? mod.displayAvatarURL() : undefined,

View file

@ -1,4 +1,4 @@
import { MessageEmbedOptions, User } from "discord.js";
import { EmbedData, User } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CaseTypes } from "../../../data/CaseTypes";
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
@ -116,13 +116,13 @@ export const CasesUserCmd = modActionsCmd({
const chunkStart = i * linesPerChunk + 1;
const chunkEnd = Math.min((i + 1) * linesPerChunk, lines.length);
const embed: MessageEmbedOptions = {
const embed: EmbedData = {
author: {
name:
lineChunks.length === 1
? `Cases for ${userName} (${lines.length} total)`
: `Cases ${chunkStart}${chunkEnd} of ${lines.length} for ${userName}`,
icon_url: user instanceof User ? user.displayAvatarURL() : undefined,
iconURL: user instanceof User ? user.displayAvatarURL() : undefined,
},
fields: [
...getChunkedEmbedFields(emptyEmbedValue, linesInChunk.join("\n")),