diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
new file mode 100644
index 0000000..6c38327
--- /dev/null
+++ b/.github/release-drafter.yml
@@ -0,0 +1,35 @@
+name-template: "v$RESOLVED_VERSION: "
+tag-template: "$RESOLVED_VERSION"
+prerelease: false
+publish: false
+exclude-labels:
+- "Action: No Changelog"
+
+category_template: "### $TITLE"
+categories:
+- title: "🚀 Features"
+ labels:
+ - "Type: Enhancement"
+- title: "🐛 Bug fixes"
+ labels:
+ - "Type: Bug (Confirmed)"
+- title: "🔧 Dependencies"
+ labels:
+ - "Type: Dependency update"
+
+change-template: "- [#$NUMBER]: **$TITLE**"
+
+version-resolver:
+ major:
+ labels:
+ - "Action: Update Major"
+ minor:
+ labels:
+ - "Action: Update Minor"
+ patch:
+ labels:
+ - "Action: Update Patch"
+ default: patch
+template: |
+ ## Release Notes
+ $CHANGES
diff --git a/.github/workflows/auto_approve_pr.yml b/.github/workflows/auto_approve_pr.yml
index 2fcf0dc..1d98d72 100644
--- a/.github/workflows/auto_approve_pr.yml
+++ b/.github/workflows/auto_approve_pr.yml
@@ -6,11 +6,6 @@ on:
- opened
branches:
- master
- pull_request:
- types:
- - opened
- branches:
- - master
jobs:
auto-approve:
diff --git a/.github/workflows/gen_javadocs.yml b/.github/workflows/gen_javadocs.yml
new file mode 100644
index 0000000..5fb91ee
--- /dev/null
+++ b/.github/workflows/gen_javadocs.yml
@@ -0,0 +1,27 @@
+name: Build Javadocs
+
+on:
+ workflow_dispatch:
+
+jobs:
+ generateJavadoc:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v2.3.4
+ with:
+ ref: 'master'
+ - name: Set up Java 11
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ - name: Generate Javadoc
+ run: ./gradlew javadoc
+ - name: Push changes
+ uses: peaceiris/actions-gh-pages@v3.8.0
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./docs
+ commit_message: "Update Docs"
+ enable_jekyll: true
diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml
new file mode 100644
index 0000000..82ec780
--- /dev/null
+++ b/.github/workflows/release_drafter.yml
@@ -0,0 +1,18 @@
+
+name: Release notes
+
+on:
+ push:
+ branches:
+ - master
+ pull_request_target:
+ branches:
+ - master
+
+jobs:
+ update_release_draft:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: release-drafter/release-drafter@v5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/build.gradle b/build.gradle
index 120a3e1..4a8ede9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ plugins{
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
-def ver = new Version(major: 6, minor: 6, patch: 6)
+def ver = new Version(major: 6, minor: 7, patch: 4)
allprojects {
apply plugin: 'maven-publish'
@@ -87,6 +87,7 @@ allprojects {
repositories {
mavenCentral()
jcenter()
+ maven { url = 'https://m2.dv8tion.net/releases' }
}
build {
diff --git a/core/src/main/java/org/botblock/javabotblockapi/core/BotBlockAPI.java b/core/src/main/java/org/botblock/javabotblockapi/core/BotBlockAPI.java
index 3106848..d460f70 100644
--- a/core/src/main/java/org/botblock/javabotblockapi/core/BotBlockAPI.java
+++ b/core/src/main/java/org/botblock/javabotblockapi/core/BotBlockAPI.java
@@ -88,6 +88,10 @@ public Builder addAuthToken(@Nonnull Site site, @Nonnull String token){
CheckUtil.notEmpty(token, "Token");
CheckUtil.condition(!site.supportsPost(), site.getName() + " does not support POST requests!");
+ // Discordlist.space requires the token to start with "Bot "
+ if(site.getName().equals("discordlist.space") && !token.startsWith("Bot "))
+ token = "Bot " + token;
+
tokens.put(site.getName(), token);
return this;
}
@@ -113,6 +117,10 @@ public Builder addAuthToken(@Nonnull Site site, @Nonnull String token){
public Builder addAuthToken(@Nonnull String site, @Nonnull String token){
CheckUtil.notEmpty(site, "Site");
CheckUtil.notEmpty(token, "Token");
+
+ // Discordlist.space requires the token to start with "Bot "
+ if(site.equals("discordlist.space") && !token.startsWith("Bot "))
+ token = "Bot " + token;
tokens.put(site, token);
return this;
diff --git a/core/src/main/java/org/botblock/javabotblockapi/core/Info.java b/core/src/main/java/org/botblock/javabotblockapi/core/Info.java
index d9a1bde..b60d658 100644
--- a/core/src/main/java/org/botblock/javabotblockapi/core/Info.java
+++ b/core/src/main/java/org/botblock/javabotblockapi/core/Info.java
@@ -35,11 +35,11 @@ public class Info{
/**
* Minor version of the Wrapper.
*/
- public static final int MINOR = 6;
+ public static final int MINOR = 7;
/**
* Patch version of the Wrapper.
*/
- public static final int PATCH = 6;
+ public static final int PATCH = 4;
/**
* Full version in the format {@code major.minor.patch}.
diff --git a/core/src/main/java/org/botblock/javabotblockapi/core/Site.java b/core/src/main/java/org/botblock/javabotblockapi/core/Site.java
index ebd7002..5f543c3 100644
--- a/core/src/main/java/org/botblock/javabotblockapi/core/Site.java
+++ b/core/src/main/java/org/botblock/javabotblockapi/core/Site.java
@@ -48,21 +48,6 @@
*/
public class Site{
- /**
- * arcane-center.xyz
- *
- *
Supported methods:
- *
- *
POST
- *
- *
- * @deprecated Website not responding.
- */
- @Deprecated
- @DeprecatedSince(major = 6, minor = 6, patch = 6)
- @PlannedRemoval(major = 6, minor = 6, patch = 8)
- public static final Site ARCANE_CENTER_XYZ = new Site("arcane-center.xyz");
-
/**
* bladebotlist.xyz
*
@@ -99,20 +84,17 @@ public class Site{
public static final Site BOATSPACE_XYZ = new Site("boatspace.xyz", HttpMethod.GET, HttpMethod.POST);
/**
- * botsdatabase.com
- *
+ * botlist.me
+ *
*
Supported methods:
*
*
GET
*
POST
*
*
- * @deprecated Website not responding.
+ * @since 6.7.2
*/
- @Deprecated
- @DeprecatedSince(major = 6, minor = 6, patch = 6)
- @PlannedRemoval(major = 6, minor = 6, patch = 8)
- public static final Site BOTSDATABASE_COM = new Site("botsdatabase.com");
+ public static final Site BOTLIST_ME = new Site("botlist.me", HttpMethod.GET, HttpMethod.POST);
/**
* bots.discordlabs.org
@@ -133,8 +115,13 @@ public class Site{
*
GET
*
POST
*
+ *
+ * @deprecated List was aquired by {@link #DISCORDS_COM discords.com}
*/
- public static final Site BOTSFORDISCORD_COM = new Site("botsfordiscord.com", HttpMethod.GET, HttpMethod.POST);
+ @Deprecated
+ @DeprecatedSince(major = 6, minor = 7, patch = 4, replacements = "DISCORDS_COM")
+ @PlannedRemoval(major = 6, minor = 7, patch = 6)
+ public static final Site BOTSFORDISCORD_COM = new Site("botsfordiscord.com");
/**
* bots.ondiscord.xyz
@@ -235,6 +222,17 @@ public class Site{
*/
public static final Site DISCORDLIST_SPACE = new Site("discordlist.space", HttpMethod.GET, HttpMethod.POST);
+ /**
+ * discords.com formerly botsfordiscord.com
+ *
+ *
Supported methods:
+ *
+ *
GET
+ *
POST
+ *
+ */
+ public static final Site DISCORDS_COM = new Site("discords.com", HttpMethod.GET, HttpMethod.POST);
+
/**
* discordservices.net
*
@@ -279,6 +277,30 @@ public class Site{
*/
public static final Site INFINITYBOTLIST_XYZ = new Site("infinitybotlist.xyz", HttpMethod.GET, HttpMethod.POST);
+ /**
+ * listcord.gg
+ *
+ *
Supported methods:
+ *
+ *
GET
+ *
POST
+ *
+ */
+ public static final Site LISTCORD_GG = new Site("listcord.gg", HttpMethod.GET, HttpMethod.POST);
+
+ /**
+ * motiondevelopment.top
+ *
+ *
Supported methods:
+ *
+ *
GET
+ *
POST
+ *
+ *
+ * @since 6.7.2
+ */
+ public static final Site MOTIONDEVELOPMENT_TOP = new Site("motiondevelopment.top", HttpMethod.GET, HttpMethod.POST);
+
/**
* paradisebots.net
*
@@ -292,6 +314,19 @@ public class Site{
*/
public static final Site PARADISEBOTS_NET = new Site("paradisebots.net", HttpMethod.GET, HttpMethod.POST);
+ /**
+ * radarbotdirectory.xyz
+ *
+ *
Supported methods:
+ *
+ *
GET
+ *
POST
+ *
+ *
+ * @since 6.7.2
+ */
+ public static final Site RADARBOTDIRECTORY_XYZ = new Site("radarbotdirectory.xyz", HttpMethod.GET, HttpMethod.POST);
+
/**
* space-bot-list.xyz
*
@@ -303,6 +338,18 @@ public class Site{
*/
public static final Site SPACE_BOT_LIST_XYZ = new Site("space-bot-list.xyz", HttpMethod.GET, HttpMethod.POST);
+ /**
+ * stellarbotlist.com
+ *
+ *
Supported methods:
+ *
+ *
GET
+ *
+ *
+ * @since 6.7.2
+ */
+ public static final Site STELLARBOTLIST_COM = new Site("stellarbotlist.com", HttpMethod.GET);
+
/**
* topcord.xyz
*
@@ -314,6 +361,19 @@ public class Site{
*/
public static final Site TOPCORD_XYZ = new Site("topcord.xyz", HttpMethod.GET, HttpMethod.POST);
+ /**
+ * vcodes.xyz
+ *
+ *
Supported methods:
+ *
+ *
GET
+ *
POST
+ *
+ *
+ * @since 6.7.2
+ */
+ public static final Site VCODES_XYZ = new Site("vcodes.xyz", HttpMethod.GET, HttpMethod.POST);
+
/**
* voidbots.net
*
@@ -362,7 +422,7 @@ private Site(String name){
/**
* The name used by the BotBlock API to identify the site.
- * The name usually is just the domain of the site without the http(s):// in front of it.
+ * The name usually represents the domain of the bot list without the https in front of it.
*
* @return The name of the site used for the BotBlock API.
*/
@@ -388,6 +448,12 @@ public boolean supportsPost(){
return !methods.isEmpty() && methods.contains(HttpMethod.POST);
}
+ /**
+ * Nested enum for the Http-methods supported by the bot lists.
+ *
+ *
Depending on what Http-Methods a bot list supports can its corresponding entry be used for the GET methods,
+ * POST methods or both.
+ */
public enum HttpMethod{
/**
* Bot list supports GET requests.
diff --git a/docs/index.html b/docs/index.html
deleted file mode 100644
index 0b7a14e..0000000
--- a/docs/index.html
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
-
Request Module for GET and POST requests from/to the BotBlock API. Javacord and JDA Module depend on this.
-
-
-
Support
-
If you require support with this Wrapper, join Andre's Support Server.
- For help regarding the BotBlock API itself should you join the BotBlock Discord Server.
- The BotBlock Discord also has a #api Channel where you can ask for support regarding this wrapper.
-
-
Do NOT contact (Ping or DM) BotBlock Staff for questions regarding this wrapper!
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..9691e9b
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,75 @@
+# JavaBotBlockAPI
+A Java Wrapper for the BotBlock.org API, supporting all API endpoints of it.
+
+## Javadocs
+Below can you find Javadocs for each module.
+
+- [Core](https://docs.botblock.org/JavaBotBlockAPI/core/)
+- [Javacord](https://docs.botblock.org/JavaBotBlockAPI/javacord/org/botblock/javabotblockapi/javacord/package-summary.html)
+- [JDA](https://docs.botblock.org/JavaBotBlockAPI/jda/org/botblock/javabotblockapi/jda/package-summary.html)
+- [Request](https://docs.botblock.org/JavaBotBlockAPI/request/org/botblock/javabotblockapi/requests/package-summary.html)
+
+## Installation
+Please replace `{version}` with the latest build available on [CodeMC](https://ci.codemc.io/job/botblock/job/JavaBotBlockAPI/).
+
+### Gradle
+```groovy
+repositories{
+ maven{ url = 'https://repo.codemc.io/repository/maven-public' }
+}
+
+dependencies{
+ // The Core and Request modules are always required.
+ compile group: 'org.botblock', name: 'javabotblockapi-core', version: '{version}'
+ compile group: 'org.botblock', name: 'javabotblockapi-request', version: '{version}'
+
+ // Javacord module for direct support with Javacord.
+ compile group: 'org.botblock', name: 'javabotblockapi-javacord', version: '{version}'
+
+ // JDA module for direct support with JDA.
+ compile group: 'org.botblock', name: 'javabotblockapi-jda', version: '{version}'
+}
+```
+
+### Maven
+```xml
+
+
+ codemc
+ https://repo.codemc.io/repository/maven-public/
+
+
+
+
+
+
+ org.botblock
+ javabotblockapi-core
+ {version}
+
+
+
+ org.botblock
+ javabotblockapi-request
+ {version}
+
+
+
+ org.botblock
+ javabotblockapi-javacord
+ {version}
+
+
+
+ org.botblock
+ javabotblockapi-jda
+ {version}
+
+
+```
+
+## Links
+
+- [BotBlock Documentation](https://botblock.org/docs)
+- [BotBlock Discord](https://botblock.org/discord) (**Do NOT ask BotBlock-Staff for help with this API Wrapper**)
+- [Andre's Support Discord](https://discord.gg/6dazXp6) (Ask in the `#javabotblockapi` channel)
diff --git a/jda/build.gradle b/jda/build.gradle
index 27635dd..ceac915 100644
--- a/jda/build.gradle
+++ b/jda/build.gradle
@@ -1,5 +1,5 @@
dependencies {
- api(group: 'net.dv8tion', name: 'JDA', version: '4.2.0_247'){
+ api(group: 'net.dv8tion', name: 'JDA', version: '4.3.0_280'){
exclude(module: 'opus-java')
}
implementation project(":core")