Fix privateChat with Bot
Dieser Commit ist enthalten in:
Ursprung
a8d00de1e2
Commit
b7164cf005
@ -65,6 +65,7 @@ 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")));
|
||||||
|
|
||||||
|
try {
|
||||||
member.getUser().openPrivateChannel().complete().sendMessage(builder.build()).complete();
|
member.getUser().openPrivateChannel().complete().sendMessage(builder.build()).complete();
|
||||||
if (member.getNickname() == null) {
|
if (member.getNickname() == null) {
|
||||||
try {
|
try {
|
||||||
@ -75,6 +76,9 @@ public class AuthManager {
|
|||||||
}
|
}
|
||||||
TOKENS.remove(code);
|
TOKENS.remove(code);
|
||||||
return member;
|
return member;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} 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());
|
||||||
|
try {
|
||||||
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete();
|
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"))));
|
||||||
|
try {
|
||||||
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete();
|
dcUser.openPrivateChannel().complete().sendMessage(messageBuilder.build()).complete();
|
||||||
|
} catch (Exception e) {
|
||||||
|
// Ignored
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren