refactor: removed code and split options (#5918)

Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>

BREAKING CHANGE: Removed `APIMessage#split`
BREAKING CHANGE: Removed `MessageEditOptions#code`
BREAKING CHANGE: Removed `BaseMessageOptions#code`
BREAKING CHANGE: Removed `BaseMessageOptions#split`
This commit is contained in:
Antonio Román
2021-06-27 00:11:40 +02:00
committed by GitHub
parent 0d0c8f07f2
commit 985d4d6a43
7 changed files with 19 additions and 101 deletions

View File

@@ -55,6 +55,16 @@ class Util {
return out;
}
/**
* Options for splitting a message.
* @typedef {Object} SplitOptions
* @property {number} [maxLength=2000] Maximum character length per message piece
* @property {string|string[]|RegExp|RegExp[]} [char='\n'] Character(s) or Regex(s) to split the message with,
* an array can be used to split multiple times
* @property {string} [prepend=''] Text to prepend to every piece except the first
* @property {string} [append=''] Text to append to every piece except the last
*/
/**
* Splits a string into multiple chunks at a designated character that do not exceed a specific length.
* @param {string} text Content to split