geforkt von SteamWar/BungeeCore
Fix SlashCommandListener
Dieser Commit ist enthalten in:
Ursprung
a0f9764a4b
Commit
10cc652c39
@ -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();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren