Infinity Docs

/

Infinity JDA

Our Official Java Library!


Java Wrapper used for interaacting with the Infinity Bots API.

Intallation

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.Zone-Infinity</groupId>
    <artifactId>IBL4J</artifactId>
    <version>VERSION</version>
</dependency>

Gradle

maven { url 'https://jitpack.io' }
implementation 'com.github.Zone-Infinity:IBL4J:VERSION'

Post Method

IBL with bot id

IBL ibl = new IBL.Builder("BOT_ID", "IBL_TOKEN");

// Post only server count
ibl.postStats(100);

// Post server count and shard count
ibl.postStats(100, 5);

IBL with jda instance

// jda -> the JDA instance of your bot
IBLClient ibl = new IBLClient.Builder(jda, "IBL_TOKEN");

// Post only server count
ibl.postStats(100);

// Post server count and shard count
ibl.postStats(100, 5);

Auto Posting

// jda -> the JDA instance of your bot
IBLClient ibl = new IBLClient.Builder(jda, "IBL_TOKEN");

// Post stats every 1 hour
ibl.autoPostStats();

// Post stats every (1000 * 60 * 60) milliseconds [1 hour]
ibl.autoPostStats(1000*60*60);

// Post stats every 1 TimeUnit#HOURS
ibl.autoPostStats(1, TimeUnit.HOURS);
Custom ScheduledExecutorService for AutoPosting
// executor -> Your instance of ScheduledExecutorService
IBLClient ibl = new IBLClient.Builder(jda, "IBL_TOKEN", executor);

Note : If you are using Discord4J and Javacord , you cannot use IBLClient.
The libraries will be added soon...

Get method

*Coming Soon...

Edit on GitHub