Esempio n. 1
0
 public static void UpdatePresence(string detail, string state = null, long start       = -1, long end         = -1, string largeKey = null, string largeText = null,
                                   string smallKey             = null, string smallText = null, string partyId = null, int size      = -1, int max = -1, string match = null, string join = null,
                                   string spectate             = null /*, bool instance*/)
 {
     instance.presence.details        = detail ?? instance.presence.details;
     instance.presence.state          = state ?? instance.presence.state;
     instance.presence.startTimestamp = (start == -1) ? instance.presence.startTimestamp : start;
     instance.presence.endTimestamp   = (end == -1) ? instance.presence.endTimestamp : end;
     instance.presence.largeImageKey  = largeKey ?? instance.presence.largeImageKey;
     instance.presence.largeImageText = largeText ?? instance.presence.largeImageText;
     instance.presence.smallImageKey  = smallKey ?? instance.presence.smallImageKey;
     instance.presence.smallImageText = smallText ?? instance.presence.smallImageText;
     instance.presence.partyId        = partyId ?? instance.presence.partyId;
     instance.presence.partySize      = (size == -1) ? instance.presence.partySize : size;
     instance.presence.partyMax       = (max == -1) ? instance.presence.partyMax : max;
     instance.presence.matchSecret    = match ?? instance.presence.matchSecret;
     instance.presence.joinSecret     = join ?? instance.presence.joinSecret;
     instance.presence.spectateSecret = spectate ?? instance.presence.spectateSecret;
     //instance.presence.presence.instance =
     DiscordRpc.UpdatePresence(instance.presence);
 }
Esempio n. 2
0
 public static void ClearAndUpdate()
 {
     ClearPresence();
     DiscordRpc.UpdatePresence(instance.presence);
 }