Archiviert
1
0

Merge pull request 'Fixup async Chat problems' (#235) from BetterDiscord into master

Reviewed-on: SteamWar/BungeeCore#235
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
YoyoNow 2021-08-24 10:03:43 +02:00
Commit 7a16760d68
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
} }