Skip to content

Commit 9463d5c

Browse files
committed
Version 6.6.6
~ Totally not evil
1 parent 600ece6 commit 9463d5c

File tree

5 files changed

+45
-87
lines changed

5 files changed

+45
-87
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins{
77
id 'com.github.johnrengelman.shadow' version '5.2.0'
88
}
99

10-
def ver = new Version(major: 6, minor: 6, patch: 5)
10+
def ver = new Version(major: 6, minor: 6, patch: 6)
1111

1212
allprojects {
1313
apply plugin: 'maven-publish'

core/src/main/java/org/botblock/javabotblockapi/core/Info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class Info{
3939
/**
4040
* Patch version of the Wrapper.
4141
*/
42-
public static final int PATCH = 5;
42+
public static final int PATCH = 6;
4343

4444
/**
4545
* Full version in the format {@code major.minor.patch}.

core/src/main/java/org/botblock/javabotblockapi/core/Site.java

+33-19
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,13 @@ public class Site{
5555
* <ul>
5656
* <li>POST</li>
5757
* </ul>
58+
*
59+
* @deprecated Website not responding.
5860
*/
59-
public static final Site ARCANE_CENTER_XYZ = new Site("arcane-center.xyz", HttpMethod.POST);
61+
@Deprecated
62+
@DeprecatedSince(major = 6, minor = 6, patch = 6)
63+
@PlannedRemoval(major = 6, minor = 6, patch = 8)
64+
public static final Site ARCANE_CENTER_XYZ = new Site("arcane-center.xyz");
6065

6166
/**
6267
* <a href="https://bladebotlist.xyz" target="_blank">bladebotlist.xyz</a>
@@ -82,6 +87,17 @@ public class Site{
8287
*/
8388
public static final Site BLIST_XYZ = new Site("blist.xyz", HttpMethod.GET, HttpMethod.POST);
8489

90+
/**
91+
* <a href="https://boatspace.xyz" target="_blank">boatspace.xyz</a>
92+
*
93+
* <p>Supported methods:
94+
* <ul>
95+
* <li>GET</li>
96+
* <li>POST</li>
97+
* </ul>
98+
*/
99+
public static final Site BOATSPACE_XYZ = new Site("boatspace.xyz", HttpMethod.GET, HttpMethod.POST);
100+
85101
/**
86102
* <a href="https://botsdatabase.com" target="_blank">botsdatabase.com</a>
87103
*
@@ -90,8 +106,13 @@ public class Site{
90106
* <li>GET</li>
91107
* <li>POST</li>
92108
* </ul>
109+
*
110+
* @deprecated Website not responding.
93111
*/
94-
public static final Site BOTSDATABASE_COM = new Site("botsdatabase.com", HttpMethod.GET, HttpMethod.POST);
112+
@Deprecated
113+
@DeprecatedSince(major = 6, minor = 6, patch = 6)
114+
@PlannedRemoval(major = 6, minor = 6, patch = 8)
115+
public static final Site BOTSDATABASE_COM = new Site("botsdatabase.com");
95116

96117
/**
97118
* <a href="https://bots.discordlabs.org" target="_blank">bots.discordlabs.org</a>
@@ -146,23 +167,6 @@ public class Site{
146167
*/
147168
public static final Site DISCORD_BOATS = new Site("discord.boats", HttpMethod.GET, HttpMethod.POST);
148169

149-
/**
150-
* <a href="https://discordbotdirectory.net" target="_blank">discordbotdirectory.net</a>
151-
*
152-
* <p>Supported methods:
153-
* <ul>
154-
* <li>GET</li>
155-
* </ul>
156-
*
157-
* @deprecated Site no longer exists.
158-
*
159-
* @since 6.3.0
160-
*/
161-
@Deprecated
162-
@DeprecatedSince(major = 6, minor = 6, patch = 4)
163-
@PlannedRemoval(major = 6, minor = 6, patch = 6)
164-
public static final Site DISCORDBOTDIRECTORY_NET = new Site("discordbotdirectory.net");
165-
166170
/**
167171
* <a href="https://discordbotlist.com" target="_blank">discordbotlist.com</a>
168172
*
@@ -231,6 +235,16 @@ public class Site{
231235
*/
232236
public static final Site DISCORDLIST_SPACE = new Site("discordlist.space", HttpMethod.GET, HttpMethod.POST);
233237

238+
/**
239+
* <a href="https://discordservices.net" target="_blank">discordservices.net</a>
240+
*
241+
* <p>Supported methods:
242+
* <ul>
243+
* <li>POST</li>
244+
* </ul>
245+
*/
246+
public static final Site DISCORDSERVICES_NET = new Site("discordservices.net", HttpMethod.POST);
247+
234248
/**
235249
* <a href="https://disforge.com" target="_blank">disforge.com</a>
236250
*

request/src/main/java/org/botblock/javabotblockapi/requests/GetBotAction.java

+6-62
Original file line numberDiff line numberDiff line change
@@ -124,36 +124,8 @@ public GetBotAction(boolean disableCache, @Nonnull String userAgent, @Nonnull St
124124
/**
125125
* Gets the full information of a bot.
126126
*
127-
* <p>The JSONObject may look like this:
128-
* <br><pre><code>
129-
* {
130-
* "id": "123456789012345678",
131-
* "username": "MyBot",
132-
* "discriminator": "1234",
133-
* "owners": [
134-
* "234567890123456789"
135-
* ],
136-
* "server_count": 100,
137-
* "invite":{@literal "https://discordapp.com/oauth2/authorize?client_id=123456789012345678&scope=bot"},
138-
* "prefix": "?",
139-
* "website": "",
140-
* "github": "",
141-
* "support": "",
142-
* "library": "JDA",
143-
* "list_data": {
144-
* "somebotlist.com": [
145-
* {"data": "Unique bot list data"},
146-
* 200
147-
* ],
148-
* "otherlist.org": [
149-
* {"data": "Unique bot list data"},
150-
* 404
151-
* ]
152-
* }
153-
* }
154-
* </code></pre>
155-
* <br>With exception of id and list_data are all returned values based on how often one appears.
156-
* <br>Each entry in list data is unique to what the respective bot list returns.
127+
* An example of how the returned JSON may look like can be found here:<br>
128+
* <a href="https://gist.github.com/Andre601/b18b1c4e88e9a405806ce7b6c29a0136" target="_blank">https://gist.github.com/Andre601/b18b1c4e88e9a405806ce7b6c29a0136</a>
157129
*
158130
* <p>Following Exceptions can be thrown from the HTTP request:
159131
* <ul>
@@ -167,43 +139,15 @@ public GetBotAction(boolean disableCache, @Nonnull String userAgent, @Nonnull St
167139
* @return Possibly-null {@link org.json.JSONObject JSONObject} containing the full information of the bot.
168140
*/
169141
@Nullable
170-
public JSONObject getBotInfo(@Nonnull Long id){
142+
public JSONObject getBotInfo(long id){
171143
return getBotInfo(String.valueOf(id));
172144
}
173145

174146
/**
175147
* Gets the full information of a bot.
176148
*
177-
* <p>The JSONObject may look like this:
178-
* <br><pre><code>
179-
* {
180-
* "id": "123456789012345678",
181-
* "username": "MyBot",
182-
* "discriminator": "1234",
183-
* "owners": [
184-
* "234567890123456789"
185-
* ],
186-
* "server_count": 100,
187-
* "invite":{@literal "https://discordapp.com/oauth2/authorize?client_id=123456789012345678&scope=bot"},
188-
* "prefix": "?",
189-
* "website": "",
190-
* "github": "",
191-
* "support": "",
192-
* "library": "JDA",
193-
* "list_data": {
194-
* "somebotlist.com": [
195-
* {"data": "Unique bot list data"},
196-
* 200
197-
* ],
198-
* "otherlist.org": [
199-
* {"data": "Unique bot list data"},
200-
* 404
201-
* ]
202-
* }
203-
* }
204-
* </code></pre>
205-
* <br>With exception of id and list_data are all returned values based on how often one appears.
206-
* <br>Each entry in list data is unique to what the respective bot list returns.
149+
* An example of how the returned JSON may look like can be found here:<br>
150+
* <a href="https://gist.github.com/Andre601/b18b1c4e88e9a405806ce7b6c29a0136" target="_blank">https://gist.github.com/Andre601/b18b1c4e88e9a405806ce7b6c29a0136</a>
207151
*
208152
* <p>Following Exceptions can be thrown from the CheckUtil:
209153
* <ul>
@@ -248,7 +192,7 @@ public JSONObject getBotInfo(@Nonnull String id){
248192
* @return Possibly-null {@link org.json.JSONObject JSONObject} containing information from the different bot list.
249193
*/
250194
@Nullable
251-
public JSONObject getBotListInfo(@Nonnull Long id){
195+
public JSONObject getBotListInfo(long id){
252196
return getBotListInfo(String.valueOf(id));
253197
}
254198

request/src/main/java/org/botblock/javabotblockapi/requests/handler/RequestHandler.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void performPOST(@Nonnull JSONObject json, int sites) throws IOException{
141141
response.protocol(),
142142
response.code(),
143143
response.message(),
144-
response.headers().toString()
144+
response.headers()
145145
);
146146
return;
147147
}
@@ -155,7 +155,7 @@ public void performPOST(@Nonnull JSONObject json, int sites) throws IOException{
155155
response.protocol(),
156156
response.code(),
157157
response.message(),
158-
response.headers().toString()
158+
response.headers()
159159
);
160160
return;
161161
}
@@ -213,7 +213,7 @@ private JSONObject performGET(@Nonnull String url, String header) throws IOExcep
213213
response.protocol(),
214214
response.code(),
215215
response.message(),
216-
response.headers().toString()
216+
response.headers()
217217
);
218218
return null;
219219
}
@@ -227,7 +227,7 @@ private JSONObject performGET(@Nonnull String url, String header) throws IOExcep
227227
response.protocol(),
228228
response.code(),
229229
response.message(),
230-
response.headers().toString()
230+
response.headers()
231231
);
232232
return null;
233233
}

0 commit comments

Comments
 (0)