Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes to !cases #431

Closed
wants to merge 3 commits into from
Closed

Conversation

metal0
Copy link
Contributor

@metal0 metal0 commented Nov 26, 2023

Solves:

  • Consistent member/mod cases-per-page limit
  • Fix inconsistency with lastCaseNum using page boundary limits on last page rather than total cases

Fixes ZDEV-45, ZDEV-46

@cla-bot cla-bot bot added the cla-signed label Nov 26, 2023
@metal0 metal0 requested a review from almeidx December 27, 2023 20:23
const title = `Most recent cases ${firstCaseNum}-${lastCaseNum} of ${totalCases} by ${modName}`;

const embed = {
author: {
name: title,
icon_url: mod instanceof User ? mod.displayAvatarURL() : undefined,
},
description: lines.join("\n"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make sure this is below 4096 characters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require some major refactoring of the createPaginatedMessage since it's stateless and we just get a fixed # of cases per page currently, would have to offset the next page by X without being able to save this state anywhere.
Probably just lower cases per page, or implement ZDEV-62

name: title,
icon_url: user instanceof User ? user.displayAvatarURL() : undefined,
},
description: lines.join("\n"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

backend/src/plugins/ModActions/commands/CasesUserCmd.ts Outdated Show resolved Hide resolved
Signed-off-by: GitHub <[email protected]>
@Dragory
Copy link
Collaborator

Dragory commented Jan 27, 2024

Continued in #454

@Dragory Dragory closed this Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants