Skip to content

Truncate response for embedding lines from github insted of silently failing. #1621

@laundmo

Description

@laundmo

current behaviour

if the bot tries to embed lines from a GitHub link with a line count over 15 or more than 2000 characters it silently fails, not responding with anything.
image

proposed behaviour

there should be a response with at least some lines, ideally containing some notification that lines were omitted
image

to consider

  • not responding at all to prevent people missing context because they assume the bot will show every line (raised by @MarkKoz on discord)
  • rely on discord file previews instead as they would allow for viewing the relevant snippet entirely in discord
    • compatibility? Do file previews work on all devices?

Related discussion on discord

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: utilityRelated to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils)good first issueGood for newcomersl: 0 - beginnerstatus: approvedThe issue has received a core developer's approvalt: enhancementChanges or improvements to existing featuresup for grabsAvailable for anyone to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions