forked from SteamWar/SteamWar
Remove debug output
This commit is contained in:
@@ -21,7 +21,6 @@ package de.steamwar.velocitycore.discord.util;
|
||||
|
||||
import de.steamwar.messages.Chatter;
|
||||
import de.steamwar.messages.Message;
|
||||
import de.steamwar.velocitycore.VelocityCore;
|
||||
import de.steamwar.velocitycore.discord.DiscordBot;
|
||||
import de.steamwar.velocitycore.discord.channels.DiscordChannel;
|
||||
import lombok.experimental.UtilityClass;
|
||||
@@ -34,24 +33,20 @@ import net.dv8tion.jda.api.utils.messages.MessageCreateBuilder;
|
||||
|
||||
import java.awt.*;
|
||||
import java.time.Instant;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@UtilityClass
|
||||
public class DiscordAlert {
|
||||
|
||||
public static void send(Chatter player, Color color, Message title, Message description, boolean success) {
|
||||
DiscordBot.withBot(bot -> {
|
||||
VelocityCore.getLogger().log(Level.INFO, "[DiscordAlert] With bot.");
|
||||
Long discordId = player.user().getDiscordId();
|
||||
if(discordId == null)
|
||||
return;
|
||||
|
||||
VelocityCore.getLogger().log(Level.INFO, "[DiscordAlert] With discord id.");
|
||||
User user = DiscordBot.getInstance().getJda().retrieveUserById(discordId).complete();
|
||||
if(user == null)
|
||||
return;
|
||||
|
||||
VelocityCore.getLogger().log(Level.INFO, "[DiscordAlert] With user.");
|
||||
MessageCreateBuilder builder = new MessageCreateBuilder()
|
||||
.setEmbeds(new EmbedBuilder()
|
||||
.setAuthor("SteamWar", "https://steamwar.de", "https://cdn.discordapp.com/app-icons/869606970099904562/60c884000407c02671d91d8e7182b8a1.png")
|
||||
@@ -64,7 +59,6 @@ public class DiscordAlert {
|
||||
builder.setComponents(ActionRow.of(Button.success("tada", Emoji.fromUnicode("U+1F389"))));
|
||||
|
||||
new DiscordChannel(user).send(builder);
|
||||
VelocityCore.getLogger().log(Level.INFO, "[DiscordAlert] Tried to send private message to " + player.user().getUserName() + " " + user);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user