Archiviert
1
0

Fix SlashCommandListener

Dieser Commit ist enthalten in:
yoyosource 2021-07-29 20:35:02 +02:00
Ursprung a0f9764a4b
Commit 10cc652c39

Datei anzeigen

@ -19,11 +19,9 @@
package de.steamwar.bungeecore.bot.listeners; package de.steamwar.bungeecore.bot.listeners;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.sql.Punishment; import de.steamwar.bungeecore.sql.Punishment;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
import de.steamwar.bungeecore.sql.Team; import de.steamwar.bungeecore.sql.Team;
import jdk.nashorn.internal.runtime.regexp.joni.constants.TargetInfo;
import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.events.interaction.SlashCommandEvent; import net.dv8tion.jda.api.events.interaction.SlashCommandEvent;
@ -97,7 +95,7 @@ public class SlashCommandListener extends BasicDiscordListener {
List<Punishment> punishmentList = Punishment.getAllPunishmentsOfPlayer(user.getId()); List<Punishment> punishmentList = Punishment.getAllPunishmentsOfPlayer(user.getId());
for (Punishment punishment : punishmentList) { for (Punishment punishment : punishmentList) {
embedBuilder.addField(punishment.getType().name() + " von " + SteamwarUser.get(punishment.getPunisher()).getUserName(), "Von: " + punishment.getBantime(punishment.getStartTime(), false) + "\nBis: " + punishment.getBantime(punishment.getEndTime(), punishment.isPerma()) + "\nGrund: " + punishment.getReason(), false); embedBuilder.addField(punishment.getType().name() + " von " + SteamwarUser.get(punishment.getPunisher()).getUserName(), "Von: " + punishment.getBantime(punishment.getStartTime(), false) + "\nBis: " + punishment.getBantime(punishment.getEndTime(), punishment.isPerma()) + "\nGrund: " + punishment.getReason(), true);
} }
event.replyEmbeds(embedBuilder.build()).setEphemeral(true).complete(); event.replyEmbeds(embedBuilder.build()).setEphemeral(true).complete();