From 7394cc859c0362bf72c30fb984a35d9cf7839506 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 29 Jul 2021 22:22:43 +0200 Subject: [PATCH] Fix SlashCommandListener --- .../bungeecore/bot/listeners/SlashCommandListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/bot/listeners/SlashCommandListener.java b/src/de/steamwar/bungeecore/bot/listeners/SlashCommandListener.java index ee08993..8389627 100644 --- a/src/de/steamwar/bungeecore/bot/listeners/SlashCommandListener.java +++ b/src/de/steamwar/bungeecore/bot/listeners/SlashCommandListener.java @@ -24,6 +24,7 @@ import de.steamwar.bungeecore.commands.BanCommand; import de.steamwar.bungeecore.sql.Punishment; import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.Team; +import de.steamwar.bungeecore.sql.UserGroup; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.events.interaction.SlashCommandEvent; @@ -137,7 +138,7 @@ public class SlashCommandListener extends BasicDiscordListener { private boolean testPermission(SlashCommandEvent event) { Member member = event.getMember(); SteamwarUser steamwarUser = SteamwarUser.get(member.getIdLong()); - if (steamwarUser == null || !steamwarUser.getUserGroup().isTeamGroup()) { + if (steamwarUser == null || (!steamwarUser.getUserGroup().isTeamGroup() && steamwarUser.getUserGroup() != UserGroup.Builder)) { event.reply("Du hast für " + event.getName() + " keine Rechte oder es existiert keine Verknüpfung für dich.").setEphemeral(true).complete(); return false; }