feat: bring embed builder field manipulation in line with underlying array functionality (#3761)

* feat: splice multiple fields

* remove MessageEmbed#spliceField
* add MessageEmbed#spliceFields
* to behave more like Array#splice
* and allow multiple fields to be replaced/inserted
* update typings accordingly

* refactor: rename check to normalize

* check suggests boolean return type

* feat: allow spread args or array as field input

* rewrite: replace addField in favor of addFields

* typings: account for changes

* chore: bump min node to 11.0.0

* for Array#flat

* fix: bump min-node in package engines field

* remove addBlankField
This commit is contained in:
Souji
2020-02-23 20:41:48 +01:00
committed by GitHub
parent ecd8cccddf
commit b727f6c1b9
6 changed files with 25 additions and 33 deletions

View File

@@ -3,7 +3,7 @@ These questions are some of the most frequently asked.
## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽
Update to Node.js 10.0.0 or newer.
Update to Node.js 11.0.0 or newer.
## How do I get voice working?
- Install FFMPEG.

View File

@@ -33,7 +33,7 @@ discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to
- 100% coverage of the Discord API
## Installation
**Node.js 10.0.0 or newer is required.**
**Node.js 11.0.0 or newer is required.**
Ignore any warnings about unmet peer dependencies, as they're all optional.
Without voice support: `npm install discordjs/discord.js`