Method: Discordrb::Interactions::OptionBuilder#role

Defined in:
lib/discordrb/data/interaction.rb

#role(name, description, required: nil) ⇒ Object

Returns Hash.

Parameters:

  • name (String, Symbol)

    The name of the argument.

  • description (String)

    A description of the argument.

  • required (true, false) (defaults to: nil)

    Whether this option must be provided.

Returns:

  • Hash



676
677
678
# File 'lib/discordrb/data/interaction.rb', line 676

def role(name, description, required: nil)
  option(TYPES[:role], name, description, required: required)
end