JDA envoie DM
event.getAuthor().openPrivateChannel().flatMap(channel -> channel.sendMessage("hello")).queue();
Nasty Nightingale
event.getAuthor().openPrivateChannel().flatMap(channel -> channel.sendMessage("hello")).queue();
// Send message without response handling
public void sendMessage(User user, String content) {
user.openPrivateChannel()
.flatMap(channel -> channel.sendMessage(content))
.queue();
}