@@ -72,48 +72,36 @@ BotBlockAPI api = new BotBlockAPI.Builder()
7272#### Notes
7373There are a lot of other methods that you can use. Head over to the [ Wiki] for more information.
7474
75- ### Creating a RequestHandler instance
76- The next step after creating an instance of the BotBlockAPI is to create an instance of the Request Handler.
77- The RequestHandler is the main class for performing the post action. It allows you to post guild counts either automatically or manual.
78-
79- You need to provide either JDA, ShardManager or the bots id and guild count.
80- The example here shows the option with JDA, but like I said can you also use ShardManager or manually add ID and guilds.
81- ``` java
82- // We previously created a BotBlockAPI instance called api which we now use here.
83- RequestHandler handler = new RequestHandler (jda, api);
84- ```
85-
86- ### Posting the guild counts
87- This step depends on what You previously set for the RequestHandler since some methods are only available for certain cases.
88-
89- ** All methods require BotBlockAPI to be setup, meaning you have to AT LEAST add one site and token!**
75+ ### Posting
76+ You can post the guilds eithe automatically or manually depending on your own preferences.
9077
9178#### Auto-posting
92- The Wrapper comes with an inbuilt auto-post that allows you to easily post the guild counts without worrying too much.
93- However, this method is limited to JDA and ShardManager only so you have to define them for using this .
79+ JavaBotBlockAPI comes with an inbuild scheduler to post yout guilds automatically.
80+ To use it simply use the ` startAutoPosting ` method and provide either a JDA instance, ShardManager instance or the bot id and guild count .
9481
95- To auto-post guild counts you just need to call ` RequestHandler#startAutoPosting(); ` .
96- This would look like this:
82+ ** Example** :
9783``` java
98- // We previously defined a RequestHandler called handler
99- handler. startAutoPosting();
84+ // We need to get an instance of RequestHandler to use the methods.
85+ RequestHandler handler = new RequestHandler ();
86+
87+ // jda is a JDA instance and api a BotBlockAPI instance.
88+ handler. startAutoPosting(jda, api);
10089```
10190
102- Easy right? But what if you want to stop the auto-posting?
103- For that simply use ` Request#stopAutoPosting(); ` . Here is another example:
104- ``` java
105- // We previously defined a RequestHandler called handler
91+ But what if you want to stop it?
92+ For that just call the ` stopAutoPosting ` method:
93+ ```
10694handler.stopAutoPosting();
10795```
10896
109- Note that the delay in which you post to the API is defined through the BotBlockAPI.
110- Use ` BotBlockAPI.Builder#setUpdateInterval(Integer) ` to define a delay. It is counted in minutes and default is 30.
111-
11297#### Manual posting
113- If you want to post the guild counts manually you can use the following method:
98+ If you want to post the guild counts manually you can use the ` postGuilds ` method.
11499``` java
115- // We previously defined a RequestHandler called handler
116- handler. postGuilds();
100+ // We need to get an instance of RequestHandler to use the methods.
101+ RequestHandler handler = new RequestHandler ();
102+
103+ // jda is a JDA instance and api a BotBlockAPI instance.
104+ handler. postGuilds(jda, api);
117105```
118106
119107### Exceptions
0 commit comments