File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ extern "C" {
2626#define DISCORD_BUTTONS_SIZE 2
2727
2828typedef struct DiscordButton {
29- const char * label ;
30- const char * url ;
29+ const char * label ; /* FIXME limit? */
30+ const char * url ; /* FIXME limit? */
3131} DiscordButton ;
3232
3333typedef enum DiscordActivityType {
@@ -39,10 +39,19 @@ typedef enum DiscordActivityType {
3939 DiscordActivityType_Competing = 5
4040} DiscordActivityType ;
4141
42+ typedef enum DiscordStatusDisplayType {
43+ DiscordStatusDisplayType_Name = 0 , // the default
44+ DiscordStatusDisplayType_State = 1 ,
45+ DiscordStatusDisplayType_Details = 2
46+ } DiscordStatusDisplayType ;
47+
4248typedef struct DiscordRichPresence {
4349 DiscordActivityType type ;
44- const char * state ; /* max 128 bytes */
45- const char * details ; /* max 128 bytes */
50+ DiscordStatusDisplayType status_display_type ;
51+ const char * state ; /* max 128 bytes */
52+ const char * state_url ; /* FIXME limit? */
53+ const char * details ; /* max 128 bytes */
54+ const char * details_url ; /* FIXME limit? */
4655 int64_t startTimestamp ;
4756 int64_t endTimestamp ;
4857 const char * largeImageKey ; /* max 32 bytes */
Original file line number Diff line number Diff line change @@ -108,8 +108,14 @@ size_t JsonWriteRichPresenceObj(char* dest,
108108 WriteKey (writer, " type" );
109109 writer.Int (presence->type );
110110
111+ WriteKey (writer, " status_display_type" );
112+ writer.Int (presence->status_display_type );
113+
111114 WriteOptionalString (writer, " state" , presence->state );
115+ WriteOptionalString (writer, " state_url" , presence->state_url );
116+
112117 WriteOptionalString (writer, " details" , presence->details );
118+ WriteOptionalString (writer, " details_url" , presence->details_url );
113119
114120 if (presence->startTimestamp || presence->endTimestamp ) {
115121 WriteObject timestamps (writer, " timestamps" );
You can’t perform that action at this time.
0 commit comments