Hotfix TeamCommand
Dieser Commit ist enthalten in:
Ursprung
ebfe912627
Commit
66c9d206e7
@ -45,9 +45,6 @@ public class TeamCommand extends BasicDiscordCommand {
|
||||
@Override
|
||||
public void run(SlashCommandEvent event) {
|
||||
SteamwarUser steamwarUser = getSteamwarUser(event);
|
||||
if (steamwarUser == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getSubcommandName() != null) {
|
||||
switch (event.getSubcommandName()) {
|
||||
@ -55,12 +52,15 @@ public class TeamCommand extends BasicDiscordCommand {
|
||||
OptionMapping optionMapping = event.getOption("team");
|
||||
Team team;
|
||||
if (optionMapping == null) {
|
||||
if (steamwarUser == null) {
|
||||
event.reply("Dein Discord ist nicht verknüpft").setEphemeral(true).complete();
|
||||
return;
|
||||
}
|
||||
if (steamwarUser.getTeam() == 0) {
|
||||
event.reply("Du bist in keinem Team").setEphemeral(true).complete();
|
||||
return;
|
||||
} else {
|
||||
team = Team.get(steamwarUser.getTeam());
|
||||
}
|
||||
team = Team.get(steamwarUser.getTeam());
|
||||
} else {
|
||||
team = Team.get(optionMapping.getAsString());
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren