View Source Nostrum.Struct.Component.ActionRow (Nostrum v0.6.1)

Action Rows.

Link to this section Summary

Functions

Create an empty action row.

Appends a button to the action row.

Lazily appends a button to the action row.

Puts the given component into the action row, any existing components are discarded.

Puts the components into the action row unless a list of inner components already exists.

Link to this section Types

Specs

t() :: %Nostrum.Struct.Component{
  components: [Nostrum.Struct.Component.components()],
  custom_id: term(),
  disabled: term(),
  emoji: term(),
  label: term(),
  max_length: term(),
  max_values: term(),
  min_length: term(),
  min_values: term(),
  options: term(),
  placeholder: term(),
  required: term(),
  style: term(),
  type: Nostrum.Struct.Component.type(),
  url: term(),
  value: term()
}

Link to this section Functions

Create an empty action row.

Options can be passed as a keyword list. The only supported option is a list of inner components

Link to this function

append(action_row, button)

View Source

Appends a button to the action row.

Returns the action row unchanged if there are already 5 buttons or if the action row contains a select menu or text input.

Link to this function

append_lazy(action_row, button)

View Source

Lazily appends a button to the action row.

If there are already 5 buttons, the first one will be dropped.

Link to this function

put(component, select_menu)

View Source

Puts the given component into the action row, any existing components are discarded.

Link to this function

put_new(component, list_of_components)

View Source

Puts the components into the action row unless a list of inner components already exists.