forked from SteamWar/SteamWar
Merge pull request 'Change Bug Button to Link' (#263) from update-bug-button into main
Reviewed-on: SteamWar/SteamWar#263 Reviewed-by: YoyoNow <yoyonow@noreply.localhost>
This commit is contained in:
@@ -26,19 +26,23 @@ import net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle;
|
||||
|
||||
@AllArgsConstructor
|
||||
public enum DiscordTicketType {
|
||||
REPORT("U+1F46E", "Spieler melden", ButtonStyle.DANGER),
|
||||
IDEA("U+1F4A1", "Feature vorschlagen", ButtonStyle.SUCCESS),
|
||||
BUG("U+1F41B", "Bug melden", ButtonStyle.SECONDARY),
|
||||
QUESTION("U+2753", "Fragen", ButtonStyle.PRIMARY),
|
||||
APPEAL("U+1F528", "Entbannungsantrag", ButtonStyle.SECONDARY),
|
||||
SCHEMATIC("U+1F4BE", "Schematic melden", ButtonStyle.DANGER);
|
||||
REPORT("U+1F46E", "Spieler melden", ButtonStyle.DANGER, null),
|
||||
IDEA("U+1F4A1", "Feature vorschlagen", ButtonStyle.SUCCESS, null),
|
||||
BUG("U+1F41B", "Bug melden", ButtonStyle.LINK, "https://git.steamwar.de/SteamWar/SteamWar/issues/new"),
|
||||
QUESTION("U+2753", "Fragen", ButtonStyle.PRIMARY, null),
|
||||
APPEAL("U+1F528", "Entbannungsantrag", ButtonStyle.SECONDARY, null),
|
||||
SCHEMATIC("U+1F4BE", "Schematic melden", ButtonStyle.DANGER, null);
|
||||
|
||||
|
||||
private final String emoji;
|
||||
private final String label;
|
||||
private final ButtonStyle style;
|
||||
private final String url;
|
||||
|
||||
public Button toButton() {
|
||||
if(style == ButtonStyle.LINK) {
|
||||
return Button.link(url, label).withEmoji(Emoji.fromUnicode(emoji));
|
||||
}
|
||||
return Button.of(style, name().toLowerCase(), Emoji.fromUnicode(emoji)).withLabel(label);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user