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

Action Rows.

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.

Types

@type t() :: %Nostrum.Struct.Component{
  channel_types: term(),
  components: [Nostrum.Struct.Component.components()],
  custom_id: term(),
  default_values: 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()
}

Functions

Link to this function

action_row(opts \\ [])

View Source (since 0.5.0)

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 (since 0.5.0)

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 (since 0.5.0)

Lazily appends a button to the action row.

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

Link to this function

flatten(map)

View Source (since 0.5.0)
Link to this function

put(component, select_menu)

View Source (since 0.5.0)

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 (since 0.5.0)

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