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

Fixed the code snippets limits #1551

Merged
merged 5 commits into from Apr 30, 2021
Merged

Conversation

dolphingarlic
Copy link
Contributor

  • Made the line limit 15 (including lines between two snippets)
  • Halved the char limit to be 1000

@vcokltfre
Copy link
Contributor

vcokltfre commented Apr 27, 2021

I'd like to suggest before this gets reviewed that perhaps instead of halving the limit which may cut off stuff people want to see, if it gets past 1k characters the output is redirect to #bot-commands instead

(line limit should stay)

@Xithrius Xithrius added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: information Related to information commands: (doc, help, information, reddit, site, tags) p: 2 - normal Normal Priority t: bug Something isn't working labels Apr 27, 2021
@jb3
Copy link
Member

jb3 commented Apr 27, 2021

Whoops, approved, but I agree with @vcokltfre's comment.

@dolphingarlic dolphingarlic requested a review from jb3 April 27, 2021 11:22
Copy link
Contributor

@vcokltfre vcokltfre left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
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.

You can get None from bot.get_channel if the cache isn't ready yet. Usually this problem is circumvented by awaiting the wait_until_guild_available event on the bot instance.

@ToxicKidz
Copy link
Contributor

I don't think you'd receive the message event if the cache wasn't ready yet.

@ChrisLovering
Copy link
Member

I don't think you'd receive the message event if the cache wasn't ready yet.

Are you sure about that? I thought message events are still emitted while the cache is filling?

@ToxicKidz
Copy link
Contributor

I guess it would be fine to just wait until the guild is ready just in case.

@vcokltfre
Copy link
Contributor

Are you sure about that? I thought message events are still emitted while the cache is filling?

Yep, message events can still be received before the ready event is received

@ChrisLovering ChrisLovering merged commit 9e59a1a into python-discord:main Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: information Related to information commands: (doc, help, information, reddit, site, tags) p: 2 - normal Normal Priority t: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants