geforkt von SteamWar/BungeeCore
Fix privateChat with Bot
Dieser Commit ist enthalten in:
Ursprung
a8d00de1e2
Commit
b7164cf005
@ -65,16 +65,20 @@ public class AuthManager {
|
||||
builder.setContent(":white_check_mark: Dein Discord Konto wurde mit **" + user.getUserName() + "** verknüpft");
|
||||
builder.setActionRows(ActionRow.of(Button.success("tada", Emoji.fromUnicode("U+1F389")), Button.danger("invalid", "Ich war das nicht")));
|
||||
|
||||
member.getUser().openPrivateChannel().complete().sendMessage(builder.build()).complete();
|
||||
if(member.getNickname() == null) {
|
||||
try {
|
||||
member.getGuild().modifyNickname(member, user.getUserName()).complete();
|
||||
} catch (Exception e) {
|
||||
// Ignored
|
||||
try {
|
||||
member.getUser().openPrivateChannel().complete().sendMessage(builder.build()).complete();
|
||||
if (member.getNickname() == null) {
|
||||
try {
|
||||
member.getGuild().modifyNickname(member, user.getUserName()).complete();
|
||||
} catch (Exception e) {
|
||||
// Ignored
|
||||
}
|
||||
}
|
||||
TOKENS.remove(code);
|
||||
return member;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
TOKENS.remove(code);
|
||||
return member;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -46,7 +46,11 @@ public class DiscordSchemAlert {
|
||||
|
||||
MessageBuilder messageBuilder = new MessageBuilder();
|
||||
messageBuilder.setEmbeds(builder.build());
|
||||
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete();
|
||||
try {
|
||||
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete();
|
||||
} catch (Exception e) {
|
||||
// Ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +67,11 @@ public class DiscordSchemAlert {
|
||||
MessageBuilder messageBuilder = new MessageBuilder();
|
||||
messageBuilder.setEmbeds(builder.build());
|
||||
messageBuilder.setActionRows(ActionRow.of(Button.success("tada", Emoji.fromUnicode("U+1F389"))));
|
||||
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete();
|
||||
try {
|
||||
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete();
|
||||
} catch (Exception e) {
|
||||
// Ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren