title: Im tryng to make a bot say a message when a user does a command
body: <p>Ok so ive been trying for 4 hours to figure this out</p>
  <p>My main.java is:</p>
  <pre><code>    import net.dv8tion.jda.api.JDA;
      import net.dv8tion.jda.api.JDABuilder;
      
      import javax.security.auth.login.LoginException;
      
      public class Main {
      
          public static void main(String[] args){
          JDABuilder jdaBuilder = JDABuilder.createDefault(&quot;token&quot;);
          JDA jda = null;
          PingPong pingPong = new PingPong();
          jdaBuilder.addEventListeners(pingPong);
          try {
              jda = jdaBuilder.build();
              }   catch (LoginException e){
              e.printStackTrace();
              }
          }
      }
  </code></pre>
  <p>and my PingPong.java is:</p>
  <pre><code>import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
  import net.dv8tion.jda.api.hooks.ListenerAdapter;
  
  public class PingPong extends ListenerAdapter {
  
      @Override
      public void onMessageReceived(MessageReceivedEvent e) {
          if (e.getMessage().getContentRaw().equals(&quot;!ping&quot;)) {
             e.getChannel().sendMessage(&quot;pong&quot;).queue();
          }
  
      }
  
  }
  </code></pre>
  <p>and i keep geting errors on like 9 (  e.getChannel().sendMessage(&quot;pong&quot;).queue();  )</p>
  <p>Error:</p>
  <pre><code>java: cannot access java.util.function.Consumer
    class file for java.util.function.Consumer not found
  </code></pre>
  <p>How do i fix this? ive just been tying to make a test command to see if it eaven works plis help</p>
  <p>idk if this has anything to do about it but im using
  intellij
  and im using jda version 4.2.0_168</p>