You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is needed for !mjolnir rules, at the very least, to make it possible to display large amounts of listed items.
My thought process is to encapsule these kinds of display events into a seperate structure anyway, to make things like "X rooms: <li><li><li>"/"no rooms" more idiomatic;
Passing a single Listing would (if needed) chunk up items so that it fits in a series of events, and MultipleListings would have multiple lists with each a header, trying to fit these in a single event if possible.
This'd make the code to pass large lists of items like this more generic, and would allow mjolnir to work even if these lists (like !mjolnir rules) would get too big.
The text was updated successfully, but these errors were encountered:
ShadowJonathan
changed the title
Internal: Have a function that splits text into multiple events at max size
Internal: Have a class/function that splits text into multiple events at max size
May 14, 2022
Additionally, for the function actually chunking the text into events, the binary search algorithm can probably be applied to find the "right" size per event quickly and efficiently.
This is needed for
!mjolnir rules
, at the very least, to make it possible to display large amounts of listed items.My thought process is to encapsule these kinds of display events into a seperate structure anyway, to make things like "X rooms:
<li><li><li>
"/"no rooms" more idiomatic;(pseudocode)
Passing a single
Listing
would (if needed) chunk upitems
so that it fits in a series of events, andMultipleListings
would have multiple lists with each a header, trying to fit these in a single event if possible.This'd make the code to pass large lists of items like this more generic, and would allow mjolnir to work even if these lists (like
!mjolnir rules
) would get too big.The text was updated successfully, but these errors were encountered: