Nostrum.Struct.Embed.put_field

You're seeing just the function put_field, go back to Nostrum.Struct.Embed module for more information.
Link to this function

put_field(embed, name, value, inline \\ nil)

View Source

Specs

Adds a Nostrum.Struct.Embed.Field under :fields in embed.

Examples

iex> embed = %Nostrum.Struct.Embed{}
...> Nostrum.Struct.Embed.put_field(embed, "First User", "b1nzy")
%Nostrum.Struct.Embed{
  fields: [
    %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"}
  ]
}

iex> embed = %Nostrum.Struct.Embed{
...>   fields: [
...>     %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"}
...>   ]
...> }
...> Nostrum.Struct.Embed.put_field(embed, "Second User", "Danny")
%Nostrum.Struct.Embed{
  fields: [
    %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"},
    %Nostrum.Struct.Embed.Field{name: "Second User", value: "Danny"}
  ]
}