Skip to content

EmbedField

Represents an embed field.


Properties



Name

A string that contains the field's name.




Value

A string that contains the field's value.




InLine

An optional boolean that represents whether the field will be displayed inline.




Constructors



new(name, value, inLine)

This method returns a new EmbedField instance.

Default Parameter Values

inLine: true

Parameters

  • name : string - The field's name.
  • value : string - The field's value.
  • inLine : string? - Whether the field will be displayed inline.




_fromObject(embedFieldObject)

This method constructs an EmbedField instance from a field object. Returns a new EmbedField instance.

Internal Code warning

This method is not meant to be used outside of Voyager's internal code.

Parameters




Methods



_ToObject()

This method returns a dictionary in this structure.

Internal Code warning

This method is not meant to be used outside of Voyager's internal code.




_Validate()

Validates the field to avoid making a pointless request to Discord. This method returns a tuple containing 2 items a boolean and an optional string.

Internal Code warning

This method is not meant to be used outside of Voyager's internal code.

Info

The boolean value indicates whether the validation was successful, and the optional string contains the error message if validation failed.