Skip to content

dondishorg/DBGAPI

Repository files navigation

DBGAPI

A simple wrapper for Discord Bots Group api

Adding to your dependencies - Gradle

Add to your build.gradle file

allprojects {
	repositories {
		maven { url 'https://jitpack.io' }
	}
}
dependencies {
	implementation 'com.github.dondish:DBGAPI:-SNAPSHOT'
}

Adding to your dependencies - Maven

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>

Posting server count

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

Getting bot information

JSONObject info = DBGAPI.getBotInfo(botid); // botid is a String of the bot's id

About

A simple wrapper for Discord Bots Group api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages