You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FieldsEmbed mode has an extension method formatField which still overrides the field value/s with function for array mapping, however with discordjs/discord.js#4880, now it causes the module to throw out an error due to field value/s being non-string type.
Proposed Solution
formatField will no longer directly pass the arguments to <FieldsEmbed>.embed.fields, instead it will be stored as a property (array of fields) in the current instance of FieldsEmbed and then all formatted fields' functions will be invoked and its output will be passed to <FieldsEmbed>.embed.fields.
This also means that invoking addField first is required.
This will remove inline option in favour of required addField invocation.
Name parameter will be converted to as a field identifier for resolving the desired field and will accept number type for providing the desired field's index. Number type will be added due to the case of different fields with identical field name.
For upcoming release of PaginationEmbed v3
FieldsEmbed
mode has an extension methodformatField
which still overrides the field value/s with function for array mapping, however with discordjs/discord.js#4880, now it causes the module to throw out an error due to field value/s being non-string type.Proposed Solution
formatField
will no longer directly pass the arguments to<FieldsEmbed>.embed.fields
, instead it will be stored as a property (array of fields) in the current instance ofFieldsEmbed
and then all formatted fields' functions will be invoked and its output will be passed to<FieldsEmbed>.embed.fields
.This also means that invokingaddField
first is required.This will removeinline
option in favour of requiredaddField
invocation.Name
parameter will be converted to as a field identifier for resolving the desired field and will acceptnumber
type for providing the desired field's index. Number type will be added due to the case of different fields with identical field name.Code ExampleNew syntax
Usage
From:
To:
ps. If you got something on your mind regarding this issue, please do not hesitate to post 🥂
ps2. NICE
The text was updated successfully, but these errors were encountered: