Archiviert
1
0

Fixup async Chat problems

Dieser Commit ist enthalten in:
yoyosource 2021-08-22 22:05:57 +02:00
Ursprung 4865c2f9a6
Commit d623f47410
4 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -67,7 +67,7 @@ public class SchematicsManager {
if (message == null) { if (message == null) {
message = textChannel.sendMessage(messageBuilder.build()).complete(); message = textChannel.sendMessage(messageBuilder.build()).complete();
} else { } else {
message.editMessage(messageBuilder.build()).complete(); message.editMessage(messageBuilder.build()).queue();
} }
} }
} }

Datei anzeigen

@ -63,6 +63,6 @@ public class IngameChatListener extends BasicDiscordListener {
assert textChannel != null; assert textChannel != null;
MessageBuilder messageBuilder = new MessageBuilder(); MessageBuilder messageBuilder = new MessageBuilder();
messageBuilder.append(message.replace("&", "").replace("@everyone", "`@everyone`").replace("@here", "`@here`").replaceAll("<[@#]!?\\d+>", "`$0`")); messageBuilder.append(message.replace("&", "").replace("@everyone", "`@everyone`").replace("@here", "`@here`").replaceAll("<[@#]!?\\d+>", "`$0`"));
textChannel.sendMessage(messageBuilder.build()).complete(); textChannel.sendMessage(messageBuilder.build()).queue();
} }
} }

Datei anzeigen

@ -54,6 +54,6 @@ public class ServerTeamChatListener extends BasicDiscordListener {
assert textChannel != null; assert textChannel != null;
MessageBuilder messageBuilder = new MessageBuilder(); MessageBuilder messageBuilder = new MessageBuilder();
messageBuilder.append(message.replace("&", "")); messageBuilder.append(message.replace("&", ""));
textChannel.sendMessage(messageBuilder.build()).complete(); textChannel.sendMessage(messageBuilder.build()).queue();
} }
} }

Datei anzeigen

@ -49,7 +49,7 @@ public class DiscordSchemAlert {
MessageBuilder messageBuilder = new MessageBuilder(); MessageBuilder messageBuilder = new MessageBuilder();
messageBuilder.setEmbeds(builder.build()); messageBuilder.setEmbeds(builder.build());
try { try {
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete(); dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).queue();
} catch (Exception e) { } catch (Exception e) {
// Ignored // Ignored
} }
@ -70,7 +70,7 @@ public class DiscordSchemAlert {
messageBuilder.setEmbeds(builder.build()); messageBuilder.setEmbeds(builder.build());
messageBuilder.setActionRows(ActionRow.of(Button.success("tada", Emoji.fromUnicode("U+1F389")))); messageBuilder.setActionRows(ActionRow.of(Button.success("tada", Emoji.fromUnicode("U+1F389"))));
try { try {
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete(); dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).queue();
} catch (Exception e) { } catch (Exception e) {
// Ignored // Ignored
} }