Archiviert
1
0

Hotfix TeamCommand

Dieser Commit ist enthalten in:
yoyosource 2021-07-30 13:14:38 +02:00
Ursprung ebfe912627
Commit 66c9d206e7

Datei anzeigen

@ -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());
}