You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see can you provide either a String with the id you can find [here][list] or use one of the many static [Site] instances that are offered.
149
+
150
+
Next would you need to choose, which type of PostAction you want to use. Depending on your selection will you need to have the right module(s) downloaded.
151
+
152
+
## Default PostAction
153
+
> **Required Modules**:
154
+
> -`request`
155
+
>
156
+
> *In the following examples will `botId` and `guilds` be used. Those are placeholders for your bot's ID and Guild count respectively.*
157
+
158
+
```java
159
+
// Create PostAction instance
160
+
PostAction postAction =newPostAction("botId");
161
+
162
+
// Post manually
163
+
postAction.postGuilds("botId", guilds, api);
164
+
165
+
// Post automatically
166
+
postAction.enableAutoPost("botId", guilds, api);
167
+
168
+
// Disable automatic posting
169
+
postAction.disableAutoPost(); // Disable with no delay
170
+
postAction.disableAutoPost(api); // Disable with BotBlockAPI#getUpdateDelay() delay
171
+
postAction.disableAutoPost(1, TimeUnit.MINUTES); // Disable with 1 Minute delay.
172
+
```
173
+
174
+
## JDA PostAction
175
+
> **Required Modules**:
176
+
> -`request`
177
+
> -`jda`
178
+
>
179
+
> *In the following examples will `botId` and `guilds` be used. Those are placeholders for your bot's ID and Guild count respectively.*
180
+
181
+
```java
182
+
/*
183
+
* Get your JDA instance.
184
+
* This can also be a ShardManager instance
185
+
* for sharded Bots.
186
+
*/
187
+
JDA jda = getJDA();
188
+
189
+
// Create PostAction instance
190
+
PostAction postAction =newPostAction(jda);
191
+
192
+
193
+
// Post manually
194
+
postAction.postGuilds(jda, api);
195
+
196
+
// Post automatically
197
+
postAction.enableAutoPost(jda, api);
198
+
199
+
// Disable automatic posting
200
+
postAction.disableAutoPost(); // Disable with no delay
201
+
postAction.disableAutoPost(api); // Disable with BotBlockAPI#getUpdateDelay() delay
202
+
postAction.disableAutoPost(1, TimeUnit.MINUTES); // Disable with 1 Minute delay.
203
+
```
204
+
205
+
## Javacord PostAction
206
+
> **Required Modules**:
207
+
> -`request`
208
+
> -`javacord`
209
+
>
210
+
> *In the following examples will `botId` and `guilds` be used. Those are placeholders for your bot's ID and Guild count respectively.*
postAction.disableAutoPost(); // Disable with no delay
229
+
postAction.disableAutoPost(api); // Disable with BotBlockAPI#getUpdateDelay() delay
230
+
postAction.disableAutoPost(1, TimeUnit.MINUTES); // Disable with 1 Minute delay.
231
+
```
232
+
233
+
----
234
+
## Get Bot Information
235
+
> **Required Modules**:
236
+
> -`core`
237
+
> -`request`
238
+
239
+
You can use the GetBotAction class to retrieve information about a bot on the different Bot lists.
240
+
The class offers options for either getting the full information as JSONObject, or to retrieve specific information such as the authors of the bot.
241
+
242
+
Due to the huge amount of methods offered by this class are we not showing any examples here.
243
+
A look into the [Javadoc] is highly recommendet.
244
+
245
+
----
246
+
## Get List Information
247
+
> **Required Modules**:
248
+
> -`core`
249
+
> -`request`
250
+
251
+
Similar to [Getting Bot Information](#get-bot-information) can you also retrieve information known by BotBlock about either all or specific bot lists.
252
+
The GetListAction allows the retrieval of all Bot Lists and their information as a JSONObject, or a specific info such as the URL used for seeing a Bot's list entry for a specific bot list.
253
+
254
+
Due to the huge amount of methods offered by this class are we not showing any examples here.
255
+
A look into the [Javadoc] is highly recommendet.
131
256
132
257
# Libraries/Dependencies
133
258
JavaBotBlockAPI utilizes different APIs to provide the functionality it offers right now.
0 commit comments