Skip to content

Trim query in command not found error to avoid embed limits#2380

Merged
mbaruh merged 2 commits into
mainfrom
trim-help-command-error-title
Mar 3, 2023
Merged

Trim query in command not found error to avoid embed limits#2380
mbaruh merged 2 commits into
mainfrom
trim-help-command-error-title

Conversation

@wookie184
Copy link
Copy Markdown
Contributor

Successor to #2286
Closes #2257

I ended up moving the trimming logic so only the query is trimmed, so you get something like Query "long..." not found rather than Query "long....

I also didn't use textwrap.shorten as that only breaks on words, so if the input had no spaces you would just get something like Query "..." not found.

Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering left a comment

Choose a reason for hiding this comment

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

minor suggestion, looks good otherwise

Comment thread bot/exts/info/help.py
@wookie184 wookie184 added t: bug Something isn't working a: frontend Related to output and formatting s: needs review Author is waiting for someone to review and approve labels Jan 14, 2023
@mbaruh mbaruh enabled auto-merge March 3, 2023 12:50
@mbaruh mbaruh merged commit a6626d2 into main Mar 3, 2023
@mbaruh mbaruh deleted the trim-help-command-error-title branch March 3, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: frontend Related to output and formatting s: needs review Author is waiting for someone to review and approve t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body

5 participants