title: JDA bot is not listening to messages
body: <p>I'm trying to make a very simple discord bot and it is my first time making one in java (with the IntelliJ IDE). It logs in and goes online correctly, but won't receive any messages that I send in the guild. The code is below:</p>
  <pre><code>import net.dv8tion.jda.api.AccountType;
  import net.dv8tion.jda.api.JDABuilder;
  import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
  import net.dv8tion.jda.api.hooks.ListenerAdapter;
  import org.jetbrains.annotations.NotNull;
  
  public class Main extends ListenerAdapter {
      public static void main(String[] args) throws Exception{
          JDABuilder bot = new JDABuilder(AccountType.BOT);
          String token = &quot;token&quot;;
          bot.setToken(token);
          bot.build();
      }
  
      @Override
      public void onMessageReceived(@NotNull MessageReceivedEvent event) {
          System.out.println(&quot;message received&quot;);
          event.getChannel().sendMessage(&quot;reeeeeeee&quot;);
          super.onMessageReceived(event);
      }
  }
  </code></pre>
  <p>I think that the flawed part is somewhere around &quot;public void onMessageReceived&quot;. I have tried many things such as rearranging my code or rewriting it, but nothing seems to work.</p>