From cc1eb7dd74312a6cac2ce75bdce124210d693e9a Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Wed, 28 Jul 2021 22:34:01 +0200 Subject: [PATCH] Add Nick and Message Signed-off-by: Chaoscaot --- src/de/steamwar/bungeecore/bot/AuthManager.java | 3 +++ .../bungeecore/bot/listeners/DiscordTicketListener.java | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/de/steamwar/bungeecore/bot/AuthManager.java b/src/de/steamwar/bungeecore/bot/AuthManager.java index 19b2cdb2..d574c460 100644 --- a/src/de/steamwar/bungeecore/bot/AuthManager.java +++ b/src/de/steamwar/bungeecore/bot/AuthManager.java @@ -66,6 +66,9 @@ public class AuthManager { 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) { + member.getGuild().modifyNickname(member, user.getUserName()).complete(); + } TOKENS.remove(code); return member; } else { diff --git a/src/de/steamwar/bungeecore/bot/listeners/DiscordTicketListener.java b/src/de/steamwar/bungeecore/bot/listeners/DiscordTicketListener.java index 2c88f8bb..7c18c6fb 100644 --- a/src/de/steamwar/bungeecore/bot/listeners/DiscordTicketListener.java +++ b/src/de/steamwar/bungeecore/bot/listeners/DiscordTicketListener.java @@ -95,6 +95,11 @@ public class DiscordTicketListener extends BasicDiscordListener { stringBuilder.append("\n"); }); + stringBuilder.append("\n"); + stringBuilder.append(" ") + .append("**").append(event.getUser().getName()).append("**: ") + .append("Ticket geschlossen"); + EmbedBuilder embedBuilder = new EmbedBuilder(); embedBuilder.setColor(Color.GREEN); User user = event.getJDA().retrieveUserById(event.getTextChannel().getTopic()).complete();