-
Notifications
You must be signed in to change notification settings - Fork 10
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
🐛 send multiple messages if solution is too big #1006
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1006 +/- ##
==========================================
+ Coverage 96.51% 96.53% +0.02%
==========================================
Files 95 95
Lines 2237 2251 +14
Branches 165 168 +3
==========================================
+ Hits 2159 2173 +14
Misses 67 67
Partials 11 11 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
else: | ||
total = 0 | ||
groups.append(group) | ||
return groups + [group] if group else groups |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jesus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine there's a functional way to do this, but I can't think of it right now.
return Embed(title="a" * length) | ||
|
||
|
||
@pytest.mark.parametrize("length", [0, 1, 3000, 6001]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are 3000 and 6001 meaningful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6000 is the max embed length discord has. 3000 is just a non-1 number within the size limit
Summary
Fixes #959
Discord has a message size limit, which sometimes big solutions will run into. This chunks up the message into the biggest possible components that can fit into a single message, then send multiple messages.
Checklist
format
in the repository rootpytest
in the repository root