$addField

Adds a new field to this embed.

Usage

$addField[embedIndex;text;value;inline]

This function has four params.

ParamDescriptionTypeRequired

embedIndex

The embed that this field should belong to.

Integer

Yes

name

The name of this field.

String

Yes

value

The value of this field.

String

Yes

inline

Whether fields should be inline. *

Boolean

No

* If 'yes', field will appear in inlined. However, if you have more than 3 fields (or the fields are just too long) with inline enabled, the bot will return rows with 3 fields (2 if there is a thumbnail) in each row. Inline fields will appear uninlined on mobile devices due to viewport size. 'no' by default.

Examples

Example #1

bot.commands.add({
    type: "basicCommand",
    name: "fields",
    code: `$addField[1;Name;Value]
    $addField[1;Name;Value]
    $addField[1;Name;Value]`
})
// Without Inline

Example #2

bot.commands.add({
    type: "basicCommand",
    name: "fields",
    code: `$addField[1;Name;Value;yes]
    $addField[1;Name;Value;yes]
    $addField[1;Name;Value;yes]`
})
// With Inline

Last updated