title: How to make a time based announcement bot
body: <p>I'd like to make a bot that simply says something in a set channel at a set time 2 days a week, but I'm not sure how to do this, I'm very new to this so please be gentle</p>
  
  <p>I tried setting a while loop to check the time constantly and if it matches a certain time it could say the announcement but the API seems to insist that regardless of there being another possible variable like my time variables there HAS to be a discord event for it to do anything.</p>
  
  <p>Please help!</p>
  
  <p>This is my "mondayevent.java" class that I've sort of given up on.</p>
  
  <pre><code>package events;
  import java.awt.*;
  import java.util.*;
  import java.time.*;
  import java.time.format.DateTimeFormatter;
  import net.dv8tion.jda.api.entities.TextChannel;
  import net.dv8tion.jda.api.events.ReadyEvent;
  import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
  import net.dv8tion.jda.api.hooks.ListenerAdapter;
  
  public class mondayevent extends ListenerAdapter {
      public void onReadyEvent(ReadyEvent event) {
          while(true) {
              DayOfWeek dow = LocalDate.now().getDayOfWeek();
              DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm:ss");
              LocalDateTime now = LocalDateTime.now();
              if(dow.equals("sunday") || dow.equals("Sunday")){
                  onGuildReady();
              }
          }
      }
  }
  
  
  //Announce "Hey! Just a reminder that there's a Business team meeting today directly following school in the STEM Lab! @Business Team "
  
  //TC:meeting-announcements(50905546**rest of ID**)
  </code></pre>
  
  <p>This is my "time.java" class that I've sort of tried to implement into the monday event class</p>
  
  <pre><code>import java.time.DayOfWeek;
  import java.time.LocalDate;
  import java.time.LocalDateTime;
  import java.time.format.DateTimeFormatter;
  
  public class time {
      public DayOfWeek dow = LocalDate.now().getDayOfWeek();
      public DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm:ss");
      public LocalDateTime now = LocalDateTime.now();
  }
  </code></pre>
  
  <p>And this is my bot main class:</p>
  
  <pre><code>import events.mondayevent;
  import net.dv8tion.jda.api.JDA;
  import net.dv8tion.jda.api.JDABuilder;
  
  public class botmain {
      public static void main(String args[]) throws Exception {
          JDA jda = new JDABuilder("***token here***").build();
          jda.addEventListener(new mondayevent());
      }
  }
  </code></pre>