All Projects → MinnDevelopment → Java Discord Rpc

MinnDevelopment / Java Discord Rpc

Licence: apache-2.0
Java bindings for https://github.com/discordapp/discord-rpc (using JNA)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Java Discord Rpc

Switchrpc
Discord Rich Presence integration for Nintendo Switch.
Stars: ✭ 116 (+11.54%)
Mutual labels:  rpc, discord
Discordrpcvs
An extension for Visual Studio 2017 that enables Discord Rich Presence.
Stars: ✭ 77 (-25.96%)
Mutual labels:  rpc, discord
Discordrpcmaker
Cross-platform Discord Rich Presence Maker, WITH BUTTONS!
Stars: ✭ 165 (+58.65%)
Mutual labels:  rpc, discord
Discord Rich Presence Tool
A C++/Qt program that lets you fill in your own custom Discord Rich Presence information for games and activities away from the PC.
Stars: ✭ 91 (-12.5%)
Mutual labels:  rpc, discord
Discordipc
Connect locally to the Discord client using IPC for a subset of RPC features like Rich Presence and Activity Join/Spectate
Stars: ✭ 66 (-36.54%)
Mutual labels:  rpc, discord
Multirpc
A Discord rich presence manager app with a cool GUI and support for custom status and multiple profiles
Stars: ✭ 94 (-9.62%)
Mutual labels:  rpc, discord
Rpc.py
A fast and powerful RPC framework based on ASGI/WSGI.
Stars: ✭ 98 (-5.77%)
Mutual labels:  rpc
Jupiter
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Stars: ✭ 1,372 (+1219.23%)
Mutual labels:  rpc
Pengubot
Official PenguBot GitHub Repository
Stars: ✭ 98 (-5.77%)
Mutual labels:  discord
Pool
General Purpose Connection Pool for GRPC,RPC,TCP Sevice Cluster
Stars: ✭ 98 (-5.77%)
Mutual labels:  rpc
Cordless
The Discord terminal client you never knew you wanted.
Stars: ✭ 1,391 (+1237.5%)
Mutual labels:  discord
Pythonstudy
Python related technologies used in work: crawler, data analysis, timing tasks, RPC, page parsing, decorator, built-in functions, Python objects, multi-threading, multi-process, asynchronous, redis, mongodb, mysql, openstack, etc.
Stars: ✭ 103 (-0.96%)
Mutual labels:  rpc
Rbb Website
Website to help connect black-owned businesses with consumers and resources
Stars: ✭ 101 (-2.88%)
Mutual labels:  discord
Openrct2
An open source re-implementation of RollerCoaster Tycoon 2 🎢
Stars: ✭ 10,115 (+9625.96%)
Mutual labels:  discord
Dapeng Soa
A lightweight, high performance micro-service framework
Stars: ✭ 101 (-2.88%)
Mutual labels:  rpc
Mods
User-made modifications and improvements to Discord Bot Maker.
Stars: ✭ 99 (-4.81%)
Mutual labels:  discord
Simple Rpc
RPC with service discovery base on netty
Stars: ✭ 103 (-0.96%)
Mutual labels:  rpc
Kurasuta
A Custom discord.js Sharding Library inspired by eris-sharder.
Stars: ✭ 101 (-2.88%)
Mutual labels:  discord
Hprose Delphi
Hprose is a cross-language RPC. This project is Hprose 2.0 for Delphi and FreePascal
Stars: ✭ 100 (-3.85%)
Mutual labels:  rpc
Rover
RoVer is a Discord bot that enables you to quickly and easily add Roblox-Discord account verification with a system that already has thousands of account links in its database.
Stars: ✭ 102 (-1.92%)
Mutual labels:  discord

java-discord-rpc

bintray-version jitpack-version

This library contains Java bindings for Discord's official RPC SDK using JNA.

This project provides binaries for linux-x86-64, win32-x86-64, win32-x86, and darwin. The binaries can be found at MinnDevelopment/discord-rpc-release

Documentation

You can see the official discord documentation in the API Documentation.
Alternatively you may visist the javadoc at jitpack.

Setup

In the follwing please replace %VERSION% with the version listed above.

Note: Version 2.0.0 and above will be listed on jcenter, if you are interested in older builds use jitpack.

Gradle

Repository

repositories {
    jcenter()
}

Artifact

dependencies {
    compile 'club.minnced:java-discord-rpc:%VERSION%'
}

Maven

Repository

<repository>
    <id>jcenter</id>
    <url>https://jcenter.bintray.com</url>
    <name>jcenter-bintray</name>
</repository>

Artifact

<dependency>
    <groupId>club.minnced</groupId>
    <artifactId>java-discord-rpc</artifactId>
    <version>%VERSION%</version>
</dependency>

Compile Yourself

  1. Install git and JDK 8+
  2. git clone https://github.com/minndevelopment/java-discord-rpc
  3. cd java-discord-rpc
  4. ./gradlew build or on windows gradlew build
  5. Get the jar from build/libs with the name java-discord-rpc-%VERSION%-all.jar

Examples

Basics

The library can be used just like the SDK. This means you can almost copy the exact code used in the official documentation.

import club.minnced.discord.rpc.*;

public class Main {
    public static void main(String[] args) {
        DiscordRPC lib = DiscordRPC.INSTANCE;
        String applicationId = "";
        String steamId = "";
        DiscordEventHandlers handlers = new DiscordEventHandlers();
        handlers.ready = (user) -> System.out.println("Ready!");
        lib.Discord_Initialize(applicationId, handlers, true, steamId);
        DiscordRichPresence presence = new DiscordRichPresence();
        presence.startTimestamp = System.currentTimeMillis() / 1000; // epoch second
        presence.details = "Testing RPC";
        lib.Discord_UpdatePresence(presence);
        // in a worker thread
        new Thread(() -> {
            while (!Thread.currentThread().isInterrupted()) {
                lib.Discord_RunCallbacks();
                try {
                    Thread.sleep(2000);
                } catch (InterruptedException ignored) {}
            }
        }, "RPC-Callback-Handler").start();
    }
}

Community Examples

If you want to add an example to the example directory you can do so by making a PR with your package and source. All I ask from you is that the example does not abuse the API in any way and that your example can compile. If you would like to add examples in other JVM languages you must first add support via the build.gradle file.

For example, examples/java/club/minnced/rpc/examples/MyGame.java would be your example file relative to the project root directory.

License

java-discord-rpc is licensed under the Apache 2.0 License. The base DiscordRPC is licensed under the MIT license.

Contributing

Find something that is lacking? Fork the project and pull request!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].