Class: Discordrb::Components::Checkbox

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/data/component.rb

Overview

A checkbox that can be ticked in a modal.

Instance Attribute Summary collapse

Instance Attribute Details

#custom_id ⇒ String (readonly)

Returns the developer-defined identifier of the checkbox.

Returns:

  • (String) —

    the developer-defined identifier of the checkbox.



566
567
568
# File 'lib/discordrb/data/component.rb', line 566

def custom_id
  @custom_id
end

#id ⇒ Integer (readonly)

Returns the numeric identifier of the checkbox.

Returns:

  • (Integer) —

    the numeric identifier of the checkbox.



559
560
561
# File 'lib/discordrb/data/component.rb', line 559

def id
  @id
end

#value ⇒ true, false (readonly) Also known as: value?

Returns whether or not the checkbox was selected.

Returns:

  • (true, false) —

    whether or not the checkbox was selected.



562
563
564
# File 'lib/discordrb/data/component.rb', line 562

def value
  @value
end