Skip to content

Commit

Permalink
Remove premium button factory with Emoji
Browse files Browse the repository at this point in the history
Can't use emojis on premium buttons
  • Loading branch information
freya022 committed Oct 14, 2024
1 parent 1c62f55 commit 0b7fe46
Showing 1 changed file with 2 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,8 @@ static Button link(@Nonnull String url, @Nonnull Emoji emoji)

/**
* Creates a button with {@link ButtonStyle#PREMIUM PREMIUM} Style.
* <br>The button is enabled and has no emoji attached by default.
* You can use {@link #asDisabled()} and {@link #withEmoji(Emoji)} to further configure it.
* <br>The button is enabled by default, and cannot have emojis attached to it.
* You can use {@link #asDisabled()} to further configure it.
*
* <p>Note that link buttons never send a {@link ButtonInteractionEvent ButtonInteractionEvent}.
* These buttons only open a modal about the SKU.
Expand Down Expand Up @@ -636,34 +636,6 @@ static Button premium(@Nonnull SkuSnowflake sku, @Nonnull String label)
return new ButtonImpl(null, label, ButtonStyle.PREMIUM, null, sku, false, null);
}

/**
* Creates a button with {@link ButtonStyle#PREMIUM PREMIUM} Style.
* <br>The button is enabled and has no text label.
* To use labels you can use {@code premium(url, label).withEmoji(emoji)}
*
* <p>To disable the button you can use {@link #asDisabled()}.
*
* <p>Note that link buttons never send a {@link ButtonInteractionEvent ButtonInteractionEvent}.
* These buttons only open a modal about the SKU.
*
* @param sku
* The target SKU for this button
* @param emoji
* The emoji to use as the button label
*
* @throws IllegalArgumentException
* If any provided argument is null or empty
*
* @return The button instance
*/
@Nonnull
static Button premium(@Nonnull SkuSnowflake sku, @Nonnull Emoji emoji)
{
Checks.notNull(sku, "SKU");
Checks.notNull(emoji, "Emoji");
return new ButtonImpl(null, "", ButtonStyle.PREMIUM, null, sku, false, emoji);
}

/**
* Create a button with the provided {@link ButtonStyle style}, URL or ID, and label.
* <br>The button is enabled and has no emoji attached by default.
Expand Down

0 comments on commit 0b7fe46

Please sign in to comment.