Skip to main content

boticordjava

An easy-to-use library designed to simplify interaction with the BotiCord API v3

GitHub Repo

Installation

Check the latest version: jitpack.io

Add to your pom.xml file:

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependency>
<groupId>com.github.megoRU</groupId>
<artifactId>boticordjava</artifactId>
<version>v5.2.1</version>
</dependency>

Basic Usage

Send bot statistics:

    public class Main {
public static void main(String[] args) {
BotiCordAPI api = new BotiCordAPI.Builder()
.token("eyJhbGciOiJIUzI1NiIsInR5cCI****.")
.build();

try {
BotStats botStats = new BotStats(200, 4, 1);
api.setBotStats("974297735559806986", botStats);
} catch (UnsuccessfulHttpException e) {
System.out.println(e.getMessage());
}
}
}

Get server information:

    public class Main {
public static void main(String[] args) {
BotiCordAPI api = new BotiCordAPI.Builder()
.token("eyJhbGciOiJIUzI1NiIsInR5cCI****.")
.build();

try {
ServerInfo serverInfo = api.getServerInfo("722424773233213460");
System.out.println(serverInfo.getDescription());
} catch (UnsuccessfulHttpException e) {
System.out.println(e.getMessage());
}
}
}