Making listener stuff volatile to fix NPE's with multiple threads accessing them
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
ef8928d3bd
Commit
a3d768b1f1
@ -55,13 +55,13 @@ public class SteamwarDiscordBot {
|
||||
}
|
||||
|
||||
@Getter
|
||||
private AnnouncementListener announcementListener;
|
||||
private volatile AnnouncementListener announcementListener;
|
||||
|
||||
@Getter
|
||||
private IngameChatListener ingameChatListener;
|
||||
private volatile IngameChatListener ingameChatListener;
|
||||
|
||||
@Getter
|
||||
private ServerTeamChatListener serverTeamChatListener;
|
||||
private volatile ServerTeamChatListener serverTeamChatListener;
|
||||
|
||||
@Getter
|
||||
private final JDA jda;
|
||||
@ -100,7 +100,6 @@ public class SteamwarDiscordBot {
|
||||
DiscordRolesMessage.sendMessage();
|
||||
DiscordRulesMessage.sendMessage();
|
||||
DiscordTicketMessage.sendMessage();
|
||||
|
||||
new RolesInteractionButtonListener();
|
||||
new DiscordTicketListener();
|
||||
new DiscordAuthListener();
|
||||
@ -109,7 +108,6 @@ public class SteamwarDiscordBot {
|
||||
ingameChatListener = new IngameChatListener();
|
||||
serverTeamChatListener = new ServerTeamChatListener();
|
||||
new SlashCommandListener();
|
||||
|
||||
jda.retrieveCommands().complete().forEach(command -> jda.deleteCommandById(command.getId()).queue());
|
||||
|
||||
Guild guild = jda.getGuildById(SteamwarDiscordBotConfig.GUILD);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren