Skip to content

Commit

Permalink
improved visuals in discord
Browse files Browse the repository at this point in the history
version 1.2->1.3
  • Loading branch information
sieadev committed Jan 19, 2024
1 parent 33332df commit 52b7051
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.siea</groupId>
<artifactId>Discord2FA</artifactId>
<version>1.2</version>
<version>1.3</version>
<packaging>jar</packaging>

<name>Discord2FA</name>
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/dev/siea/discord2fa/discord/DiscordUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
import net.dv8tion.jda.api.entities.emoji.Emoji;
import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import net.dv8tion.jda.api.interactions.components.buttons.Button;
import net.dv8tion.jda.api.sharding.ShardManager;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;

import java.awt.*;
import java.security.SecureRandom;
import java.sql.SQLException;
import java.util.Objects;
Expand Down Expand Up @@ -59,6 +61,7 @@ private static void sendLinkMessage(String title, String text, String footer, St
embedBuilder.setTitle(title);
embedBuilder.setDescription(text);
embedBuilder.setFooter(footer);
embedBuilder.setColor(Color.GREEN);
channel.sendMessageEmbeds(embedBuilder.build()).addActionRow(
Button.success("link", button))
.queue();
Expand Down Expand Up @@ -151,8 +154,8 @@ public static void sendVerify(Account account, String ip){

if (user != null) {
user.openPrivateChannel().queue(privateChannel -> privateChannel.sendMessageEmbeds(embedBuilder.build()).addActionRow(
Button.success("accept", button1),
Button.danger("deny", button2))
Button.success("accept", button1).withEmoji(Emoji.fromUnicode("✅")),
Button.danger("deny", button2).withEmoji((Emoji.fromUnicode("❌"))))
.queue());
}

Expand Down

0 comments on commit 52b7051

Please sign in to comment.