mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-16 14:45:02 +00:00
fix: dont show hidden cases without -hidden arg
This commit is contained in:
parent
8a4f7fe0e8
commit
2f4fe6fde2
1 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ export const CasesUserCmd = modActionsCmd({
|
||||||
// Compact view (= regular message with a preview of each case)
|
// Compact view (= regular message with a preview of each case)
|
||||||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
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);
|
const prefix = getGuildPrefix(pluginData);
|
||||||
|
|
||||||
createPaginatedMessage(
|
createPaginatedMessage(
|
||||||
|
@ -103,7 +103,7 @@ export const CasesUserCmd = modActionsCmd({
|
||||||
msg.channel,
|
msg.channel,
|
||||||
totalPages,
|
totalPages,
|
||||||
async (page) => {
|
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 lines = await asyncMap(chunkedCases, (c) => casesPlugin.getCaseSummary(c, true, msg.author.id));
|
||||||
|
|
||||||
const isLastPage = page === totalPages;
|
const isLastPage = page === totalPages;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue