ButtonBuilder constructor

ButtonBuilder(
  1. String label,
  2. String customId,
  3. ComponentStyle style, {
  4. bool disabled = false,
  5. IEmoji? emoji,
})

Creates instance of ButtonBuilder

Implementation

ButtonBuilder(
    String label,
    this.customId,
    ComponentStyle style,
    {bool disabled = false,
      IEmoji? emoji
    }) : super(label, style, disabled: disabled, emoji: emoji
) {
  if (this.label.length > 100) {
    throw ArgumentError("customId for button cannot have more than 100 characters");
  }
}