Update README.md
This commit is contained in:
31
README.md
31
README.md
@@ -1,4 +1,31 @@
|
||||
# Installation
|
||||
1. Follow the steps at https://docs.discord.com/developers/discord-social-sdk/getting-started
|
||||
2. Download the Discord Social SDK Standalone
|
||||
3. Add the DISCORD_SDK environment variable `export DISCORD_SDK=<path-to-discord-sdk>`
|
||||
4. Clone this repo and compile the libraries
|
||||
```
|
||||
export DISCORD_SDK=<path-to-discord-sdk>
|
||||
git clone https://github.com/zxrotwo002/java-discord-sdk-wrapper
|
||||
cd java-discord-sdk-wrapper
|
||||
./export.sh
|
||||
```
|
||||
```
|
||||
5. Add the compiled libraries in out/lib to your system libraries or wherever your java application can access them:
|
||||
```
|
||||
sudo cp libdiscord_partner_sdk.so /usr/lib
|
||||
sudo cp libdiscord_bridge.so /usr/lib
|
||||
```
|
||||
6. Add the `DiscordLib.jar` to your project
|
||||
7. Initialize the Discord Social SDK
|
||||
```
|
||||
DiscordBridge bridge = new DiscordBridge();
|
||||
bridge.init(<Your Discord Application ID found in the Developer Portal>);
|
||||
bridge.setAdapter(<Add the DiscordBridgeAdapter interface if you want to receive possible error messages from the Library>);
|
||||
bridge.start();
|
||||
```
|
||||
8. Send activity updates
|
||||
```
|
||||
DiscordActivity activity = new DiscordActivityBuilder()
|
||||
.name("Some name")
|
||||
...
|
||||
.build;
|
||||
```
|
||||
9. Keep your application alive with a `while(true)` or similar
|
||||
|
||||
Reference in New Issue
Block a user