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.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")));
|
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();
|
try {
|
||||||
if(member.getNickname() == null) {
|
member.getUser().openPrivateChannel().complete().sendMessage(builder.build()).complete();
|
||||||
try {
|
if (member.getNickname() == null) {
|
||||||
member.getGuild().modifyNickname(member, user.getUserName()).complete();
|
try {
|
||||||
} catch (Exception e) {
|
member.getGuild().modifyNickname(member, user.getUserName()).complete();
|
||||||
// Ignored
|
} catch (Exception e) {
|
||||||
|
// Ignored
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
TOKENS.remove(code);
|
||||||
|
return member;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
TOKENS.remove(code);
|
|
||||||
return member;
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,11 @@ public class DiscordSchemAlert {
|
|||||||
|
|
||||||
MessageBuilder messageBuilder = new MessageBuilder();
|
MessageBuilder messageBuilder = new MessageBuilder();
|
||||||
messageBuilder.setEmbeds(builder.build());
|
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 messageBuilder = new MessageBuilder();
|
||||||
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"))));
|
||||||
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