Skip to content

Internal: Have a class/function that splits text into multiple events at max size #294

Closed as not planned
@ShadowJonathan

Description

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)

class Listing:
  header: (str, str) # html + text
  items: [](str, str)

class MultipleListings:
  listings: []Listing

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions