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

fix: dont show hidden cases without -hidden arg

This commit is contained in:
Ruby 2024-05-29 16:25:04 +02:00
parent 8a4f7fe0e8
commit 2f4fe6fde2
No known key found for this signature in database
GPG key ID: 74D9DB37B03A4804

View file

@ -95,7 +95,7 @@ export const CasesUserCmd = modActionsCmd({
// Compact view (= regular message with a preview of each case)
const casesPlugin = pluginData.getPlugin(CasesPlugin);
const totalPages = Math.max(Math.ceil(cases.length / casesPerPage), 1);
const totalPages = Math.max(Math.ceil(casesToDisplay.length / casesPerPage), 1);
const prefix = getGuildPrefix(pluginData);
createPaginatedMessage(
@ -103,7 +103,7 @@ export const CasesUserCmd = modActionsCmd({
msg.channel,
totalPages,
async (page) => {
const chunkedCases = chunkArray(cases, casesPerPage)[page - 1];
const chunkedCases = chunkArray(casesToDisplay, casesPerPage)[page - 1];
const lines = await asyncMap(chunkedCases, (c) => casesPlugin.getCaseSummary(c, true, msg.author.id));
const isLastPage = page === totalPages;