Infinite Message Lengths were implemented for block messages in #55, however support for infinite streamed messages would be nice too!
It might be a bit more difficult to implement this for embedded messages, but they should both be just fine.
Notes
Below is what it currently is. Might want to figure out how to work around the for await in TypeScript.
Sample from messageNormal.ts
// run query based on stream preference, true = stream, false = block
if (stream) {
response = await streamResponse(params)
for await (const portion of response) {
// append token to message
result += portion.message.content
// exceeds handled length
if (result.length > 2000) {
message.channel.send(`Response length ${result.length} has exceeded Discord maximum.\n\nLong Stream messages not supported.`)
break // stop stream
}
// resent current output, THIS WILL BE SLOW due to discord limits!
sentMessage.edit(result || 'No Content Yet...')
}
} else { ... }
Issue
Notes
for await
in TypeScript.Sample from
messageNormal.ts