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

raw command doesn't trim lines that are too long for the paginator #1037

Closed
MarkKoz opened this issue Jul 11, 2020 · 2 comments · Fixed by #3038
Closed

raw command doesn't trim lines that are too long for the paginator #1037

MarkKoz opened this issue Jul 11, 2020 · 2 comments · Fixed by #3038
Labels
a: information Related to information commands: (doc, help, information, reddit, site, tags) good first issue Good for newcomers l: 0 - beginner p: 3 - low Low Priority status: approved The issue has received a core developer's approval t: bug Something isn't working up for grabs Available for anyone to work on

Comments

@MarkKoz
Copy link
Member

MarkKoz commented Jul 11, 2020

Sentry Issue: BOT-6H

The command uses discord.py's default Paginator. Can that be replaced with our LinePaginator, which automatically moves long text to a new page?

RuntimeError: Line exceeds maximum page size 1992
  File "discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/cogs/information.py", line 412, in raw
    add_content(title, transformer(item))
  File "bot/cogs/information.py", line 396, in add_content
    paginator.add_line(content.replace('```', '`` `'))
  File "discord/ext/commands/help.py", line 127, in add_line
    raise RuntimeError('Line exceeds maximum page size %s' % (max_page_size))

Error executing command invoked by <REDACTED>: !raw <REDACTED>
@MarkKoz MarkKoz added t: bug Something isn't working p: 3 - low Low Priority a: information Related to information commands: (doc, help, information, reddit, site, tags) labels Jul 11, 2020
@MarkKoz MarkKoz self-assigned this Aug 6, 2020
@MarkKoz
Copy link
Member Author

MarkKoz commented Aug 6, 2020

I got it to work with LinePaginator but it the presentation is not very readable, especially since embeds are fixed to a narrow width. How does everyone feel about sending a hastebin link if the content is over 2000 characters?

@wookie184
Copy link
Contributor

Sending a hastebin link sounds like a good idea.

@wookie184 wookie184 added good first issue Good for newcomers status: approved The issue has received a core developer's approval labels Mar 4, 2023
@wookie184 wookie184 added up for grabs Available for anyone to work on l: 0 - beginner labels Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: information Related to information commands: (doc, help, information, reddit, site, tags) good first issue Good for newcomers l: 0 - beginner p: 3 - low Low Priority status: approved The issue has received a core developer's approval t: bug Something isn't working up for grabs Available for anyone to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants