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

[BUG] User->Create context menu command fails because the button's custom ID is too long #494

Open
1 task done
eartharoid opened this issue Oct 17, 2023 · 0 comments
Open
1 task done
Labels
bug Something isn't working
Milestone

Comments

@eartharoid
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

User->Create worked in testing, but the creation prompt button can't be sent if the action and/or categoryId push the custom ID over the 100-character limit.

 16/10/23 23:53:51  [ERROR] (MENUS) "create" menu execution error: ExpectedConstraintError > s.string.lengthLessThanOrEqual
  Invalid string length

  Expected: expected.length <= 100

  Received:
  | '{"action":"questions","categoryId":1686,"referencesMessage":"1126972889170718753/1163549810507386973"}'

    at Object.run (/home/container/node_modules/.pnpm/@[email protected]/node_modules/@sapphire/shapeshift/dist/index.js:1546:79)
    at /home/container/node_modules/.pnpm/@[email protected]/node_modules/@sapphire/shapeshift/dist/index.js:212:66
    at Array.reduce (<anonymous>)
    at StringValidator.parse (/home/container/node_modules/.pnpm/@[email protected]/node_modules/@sapphire/shapeshift/dist/index.js:212:29)
    at ModalBuilder.setCustomId (/home/container/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/builders/dist/index.js:1342:45)
    at TicketManager.create (/home/container/src/lib/tickets/manager.js:276:7)
    at async CreateMenu.run (/home/container/src/menus/create.js:18:3)

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:
- Node:
- NPM:
- Bot: 4.0.10

Anything else?

The channel ID in referencesMessage probably isn't necessary as the button should always be in the same channel as the message.

@eartharoid eartharoid added bug Something isn't working triage Needs triage and removed triage Needs triage labels Oct 17, 2023
@eartharoid eartharoid added this to the v4.1 milestone Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant