A simple wrapper for Discord Bots Group api
Add to your build.gradle file
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.dondish:DBGAPI:-SNAPSHOT'
}
add to your maven build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.dondish</groupId>
<artifactId>DBGAPI</artifactId>
<version>-SNAPSHOT</version>
</dependency>
If you use JDA I really recommend just doing:
new DBGAPI(jda, token); // jda is your JDA instance and token is the String of your api token
it will automatically post server count for you!
otherwise you can use
DBGAPI api = new DBGAPI(token, botid); // token is a String of your api token, botid is a String of your bot's id
api.postServerCount(servercount); // servercount is a long of your server count
and you can use
DBGAPI.postServerCount(jda, token); // jda is your JDA instance and token is the String of your api token
and lastly
DBGAPI.postServerCount(servercount, token, botid); // jda is your JDA instance and token is the String of your api token, botid is a String of your bot's id
JSONObject info = DBGAPI.getBotInfo(botid); // botid is a String of the bot's id