Skip to content
This repository was archived by the owner on Oct 23, 2021. It is now read-only.

Commit 32f3bd3

Browse files
Change default encoding to UTF-8
Fixes #19
1 parent 8ee53c1 commit 32f3bd3

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/main/java/club/minnced/discord/rpc/DiscordRichPresence.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
int8_t instance;
4343
} DiscordRichPresence;
4444
*/
45+
4546
/**
4647
* Struct binding for a RichPresence
4748
*/
@@ -65,6 +66,15 @@ public class DiscordRichPresence extends Structure
6566
"instance"
6667
));
6768

69+
public DiscordRichPresence(String encoding) {
70+
super();
71+
setStringEncoding(encoding);
72+
}
73+
74+
public DiscordRichPresence() {
75+
this("UTF-8");
76+
}
77+
6878
/**
6979
* The user's current party status.
7080
* <br>Example: "Looking to Play", "Playing Solo", "In a Group"

src/main/java/club/minnced/discord/rpc/DiscordUser.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
typedef struct DiscordUser {
2828
const char* userId;
2929
const char* username;
30+
const char* discriminator;
3031
const char* avatar;
3132
} DiscordUser;
3233
*/
34+
3335
/**
3436
* Struct binding for a discord join request.
3537
*/
@@ -42,6 +44,15 @@ public class DiscordUser extends Structure
4244
"avatar"
4345
));
4446

47+
public DiscordUser(String encoding) {
48+
super();
49+
setStringEncoding(encoding);
50+
}
51+
52+
public DiscordUser() {
53+
this("UTF-8");
54+
}
55+
4556
/**
4657
* The userId for the user that requests to join
4758
*/

0 commit comments

Comments
 (0)