-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Add an option that allows resulting content to be oversized, and fallback to processing the result as a file if it is too large - similar to the behaviour of all /debug * commands (chat, user and message).
/code * ... {option}: boolean
disable_trim = falsetrim_content = true
Lines 208 to 233 in 9bafefb
| while (content.length > 2000) { | |
| amendNotes.add('Requested content was trimmed.'); | |
| const lines = content.split('\n'); | |
| // #region trim location | |
| if (subCommand === 'entity' && trimTopThisTime) { | |
| lines.splice(notesCount + 2, 1); | |
| actualStart++; | |
| } else { | |
| lines.splice(-2, 1); | |
| actualEnd--; | |
| } | |
| trimTopThisTime = !trimTopThisTime; | |
| // #endregion | |
| // #region notes re-injection | |
| if (amendNotes.size !== notesCount) { | |
| const notesLines = [...amendNotes].map((note) => `> ${note}`); | |
| lines.splice(1, notesCount, ...notesLines); | |
| notesCount = amendNotes.size; | |
| } | |
| // #endregion | |
| lines[0] = this.generateContentHeader(file, [startLine, actualStart], [endLine, actualEnd]); | |
| content = lines.join('\n'); | |
| } |
It is worth noting that Discord stable doesn't appear to have the file preview which its siblings have had for some time.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request