Dorian349 / bfd-java-api

A simple API wrapper for discords.com (alias botsfordiscord.com) written in Java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discords.com / BotsForDiscord.com Java Library

Release Build Status

A simple API wrapper for discords.com (alias botsfordiscord.com) written in Java 8.

Installation

This wrapper is distributed using jitpack.io.

Using Maven:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>com.github.Dorian349</groupId>
        <artifactId>bfd-java-api</artifactId>
        <version>1.1.0</version>
    </dependency>
</dependencies>

Using Gradle:

repositories {
    maven { url 'https://jitpack.io' }
}
dependencies {
    implementation 'com.github.Dorian349:bfd-java-api:1.1.0'
}

Features

• Collect information about a user from discords.com

• Collect information about a bot from discords.com such as votes / widget

• Post the bot server count on discords.com

Simplest Usage

Note: All classes contains getters to get every information listed on the documentation. The below examples are just some basic usages. You will need to get your API key and bot id to fully use the wrapper.

Firstly, you should create a new instance of BotsForDiscordAPI, this will be the main object for all future requests using this wrapper.

BotsForDiscordAPI botsForDiscordAPI = new BotsForDiscordAPI("Your bot ID", "Your API token");

Then, you can easily use the 6 different methods to get/post information.

User user = botsForDiscordAPI.getUser("234735468267307008");
System.out.println(user.getUsername()); //Dorian349

Bot bot = botsForDiscordAPI.getBot("466204515390193674");
System.out.println(bot.getName()); //MyBrawlStats

botsForDiscordAPI.postStats(jda.getGuilds().size());

About

A simple API wrapper for discords.com (alias botsfordiscord.com) written in Java.

License:MIT License


Languages

Language:Java 100.0%