Currently, it is theoretically possible to attempt selecting a range below 0.
This is currently the only check in place, checking if startLine exceeds the total line count of the file.
|
if (startLine > lines.length) { |
|
return { |
|
ephemeral: true, |
|
content: [ |
|
`**Failover:** Line selection out of bounds.`, |
|
`> Start Line: \`${startLine + 1}\``, |
|
`> Total Lines: \`${lines.length}\`` |
|
].join('\n') |
|
}; |
|
} |
#50 could easily be thrown out and have an error returned instead, for which an onError method could be added.
Currently, it is theoretically possible to attempt selecting a range below 0.
/code entityaroundshould be greater than 0/code linesstartandendshould be greater than 1This is currently the only check in place, checking if
startLineexceeds the total line count of the file.docs-bot/src/commands/code.ts
Lines 136 to 145 in 9bafefb
#50 could easily be thrown out and have an error returned instead, for which an
onErrormethod could be added.