Skip to content

Commit

Permalink
fix: dont show hidden cases without -hidden arg
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyowo committed Jun 2, 2024
1 parent 8a4f7fe commit 2f4fe6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/plugins/ModActions/commands/CasesUserCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ 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(
pluginData.client,
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;
Expand Down

0 comments on commit 2f4fe6f

Please sign in to comment.