@Override
public void onGuildMemberJoin(@NotNull GuildMemberJoinEvent event) {
TextChannel textChannel = event.getGuild().getTextChannelsByName("channel-name", true).getFirst();
String userMention = event.getMember().getAsMention();
String greeting = String.format("Привет, %s. Зайди в канал #roles.", userMention);
textChannel.sendMessage(greeting).queue();
}
}
That is my code. I am a beginner only, but I suspect there might be a problem with encoding.
I searched through JDA documentation and didn't find much help. What is the problem here?
I just fixed it, turns out you have this thing called Locale. If you need to process input of different languages it is a best practice to change the defaultLocale.