of

@CheckReturnValue
fun of(style: ButtonStyle, label: String): ButtonFactory(source)

Creates a button factory with the style and label provided.

You can use ButtonFactory.persistent or ButtonFactory.ephemeral to then start building a button.

See also

Throws

If the label is empty


@CheckReturnValue
fun of(style: ButtonStyle, emoji: Emoji): ButtonFactory(source)

Creates a button factory with the style and emoji provided.

You can use ButtonFactory.persistent or ButtonFactory.ephemeral to then start building a button.

See also

EmojiUtils.resolveJDAEmoji

@CheckReturnValue
fun of(style: ButtonStyle, label: String, emoji: Emoji): ButtonFactory(source)

Creates a button factory with the style, label and emoji provided.

You can use ButtonFactory.persistent or ButtonFactory.ephemeral to then start building a button.

See also

EmojiUtils.resolveJDAEmoji

Throws

If the label is empty


@CheckReturnValue
fun of(content: ButtonContent): ButtonFactory(source)

Creates a button factory with the style, label and emoji provided by the ButtonContent.

You can use ButtonFactory.persistent or ButtonFactory.ephemeral to then start building a button.

See also

EmojiUtils.resolveJDAEmoji

Throws

If the label is null/blank and the emoji isn't set