title: My Discord-Bot stopped executing its commands
body: <p>Just today I've realized that my bot didn't do anything after a new user joined, even though he is supposed to automatically assign a role as he did before. After a quick check, he doesn't respond to any commands at all anymore, even though it worked just fine yesterday.</p>
  <p>My Bot still connects to the server and changes to the main function still get recognized (as for example changing its online-status oder activity), but the <code>EventListeners</code> don't seem to react and thus, no commands are executed.</p>
  <p>The Bot is coded in Java and uses jdk 13, the library used is the net.dv8tion library JDA-4.2.0-175-withDependencies.jar</p>
  <p>Things I have already tried which didn't work:</p>
  <ul>
  <li>Let the bot rejoin</li>
  <li>Refresh the bot and try a refreshed Token</li>
  <li>Update Java</li>
  <li>Assign Administrator-Permissions (again)</li>
  <li>Use the <code>create()</code>-command instead of the <code>JDABuilder</code> (<em>maybe I did it wrong</em>)</li>
  </ul>
  <p>Also, I have to point out that <em>other Bots, as for example the Rythm-Bot on our server, run completely fine.</em></p>
  <p>Here are some screenshots that may give the information you need (code snippets &amp; discord example)</p>
  <p><a href="https://imgur.com/a/r9U0ZBZ" rel="nofollow noreferrer">https://imgur.com/a/r9U0ZBZ</a></p>
  <p>I am &quot;fairly new&quot; to coding, so even if you have to criticize some snippets shown, I will happily implement upgrades or cleaner code, but the main priority is to get this bot running again. I hope you can help!</p>
  <p>Edit: code snippet as text</p>
  <pre><code>    public class Main {
      public static JDA jda;
      public static String prefix = &quot;rev&quot;;
      public static String adminPrefix = &quot;toolkit&quot;;
  
  
      public static void main(String[] args) throws LoginException {
          jda = new JDABuilder(AccountType.BOT).setToken(&quot;my bot token&quot;).build();
          jda.getPresence().setStatus(OnlineStatus.IDLE);
          jda.getPresence().setActivity(Activity.playing(&quot;mit nem Butterfly&quot;));
          jda.addEventListener(new commands());
          jda.addEventListener(new serverJoin());
          jda.addEventListener(new adminCommands());
          jda.addEventListener(new selfRoles());
          jda.addEventListener(new chatlog());
          jda.addEventListener(new selfRoleRemove());
      }
  }
  </code></pre>
  <p>example class: joining the server</p>
  <pre><code>public class serverJoin extends ListenerAdapter {
  
  
      public void onGuildMemberJoin(GuildMemberJoinEvent event) {
          Guild guild = event.getGuild();
          Role role = guild.getRoleById(736342426632847381L); //initialisiert die oben eingegebe Rolle
          Member member = event.getMember(); //sucht, wer gejoined ist
          assert role != null;
          guild.addRoleToMember(member, role).complete(); //vergibt die Rolle
          String[] nachrichten = {
                  &quot;[member] hat sich auf diesen Discord verirrt, warmen Empfang bitte!&quot;,
                  &quot;Macht gefälligst Platz für [member]!&quot;,
                  &quot;Willkommen bei Reveries, [member]&quot;,
                  &quot;Hey [member], schönen Aufenthalt!&quot;,
                  &quot;Räumt gefälligst auf, wir wollen keinen schlechten Eindruck gegenüber [member] machen!&quot;,
          };
          Random zufallsZahlMacher = new Random();
          int zufallsZahl = zufallsZahlMacher.nextInt(nachrichten.length); //zufällige Textlinie von String[] nachrichten
  
          EmbedBuilder information = new EmbedBuilder();
          information.setColor(0x00ffff);
          information.setDescription(nachrichten[zufallsZahl].replace(&quot;[member]&quot;, member.getAsMention()));
          information.setFooter(&quot;Willkommen! &quot; + event.getMember().getUser().getName(), event.getMember().getUser().getAvatarUrl());
          event.getGuild().getTextChannelById(753546835347374171L).sendMessage(information.build()).queue();
  
          event.getUser().openPrivateChannel().flatMap(privateChannel -&gt; privateChannel.sendMessage(&quot;**Willkommen auf dem Revery-Discord!** \n Damit du einen guten Start auf dem Server hast, bitten wir dich, die Regeln zu lesen und eine kurze Vorstellung in den #vorstellrunde-Channel zu schreiben. \n Nachdem du deine Vorstellung geschrieben hast (*welche mind. Name, Alter, Hobbies, Musikrichtung und Lieblingsspiel beeinhaltet*), wird dich zeitnah ein Serverteam-Mitglied freischalten und du kriegst Zugang zu unserem Server. \n Damit ein guter Start gewährleistet ist, bitten wir dich, den Command revhelp in den #bot-commands-Channel zu schreiben. \n \n \uD835\uDC16\uD835\uDC22\uD835\uDC2B \uD835\uDC1F\uD835\uDC2B\uD835\uDC1E\uD835\uDC2E\uD835\uDC1E\uD835\uDC27 \uD835\uDC2E\uD835\uDC27\uD835\uDC2C \uD835\uDC1A\uD835\uDC2E\uD835\uDC1F \uD835\uDC1D\uD835\uDC22\uD835\uDC1C\uD835\uDC21!&quot;)).queue();
          }
      }
  </code></pre>