title: GuildMemberJoin PN Message
body: <p>Hey I want to send a welcome message to new people.
  This is my Code. Im very new at Java please help me to get this feature working:</p>
  
  <pre><code>package de.backxtar.listener;
  
  import java.time.OffsetDateTime;
  
  import net.dv8tion.jda.api.EmbedBuilder;
  import net.dv8tion.jda.api.entities.Member;
  import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent;
  import net.dv8tion.jda.api.hooks.ListenerAdapter;
  
  public class JoinListener extends ListenerAdapter {
  
      @Override
      public void onGuildMemberJoin(GuildMemberJoinEvent event) {
          Member member = event.getMember();
  
          if((event.getGuild().getDefaultChannel()) != null) {
  
              EmbedBuilder builder = new EmbedBuilder();
  
              builder.setColor(0xf22613);
              builder.setThumbnail("http://image.png");
              builder.setTitle("Willkommen auf Da Hood!");
              builder.setFooter("Powered by Backxtar.");
              builder.setTimestamp(OffsetDateTime.now());
              builder.setDescription("Herzlich willkommen" + member.getAsMention() + "auf **Da Hood**!\n"
                      + "[**Da Hood - The Best Gaming-Discord!**](https://xyz.gg)");
  
              member.getUser().openPrivateChannel().queue((ch) -&gt; {
                  ch.sendMessage(builder.build()).queue();
              });
          }
      }
  }
  </code></pre>
  
  <p>How does this funktion to be? <code>if((event.getGuild().getDefaultChannel()) != null) {</code></p>
  
  <p>Thanks!!</p>