예제 #1
0
        public static void UpdatePresence(RichPresence presence)
        {
            DiscordRichPresence rich = new DiscordRichPresence {
            };

            rich.state   = ConvertString(presence.State);
            rich.details = ConvertString(presence.Details);

            rich.startTimestamp = presence.startTimestamp;
            rich.endTimestamp   = presence.endTimestamp;

            rich.largeImageKey  = ConvertString(presence.largeImageKey);
            rich.largeImageText = ConvertString(presence.largeImageText);
            rich.smallImageKey  = ConvertString(presence.smallImageKey);
            rich.smallImageText = ConvertString(presence.smallImageText);

            rich.partySize = presence.partySize;
            rich.partyMax  = presence.partyMax;

            rich.matchSecret    = ConvertString(presence.matchSecret);
            rich.joinSecret     = ConvertString(presence.joinSecret);
            rich.spectateSecret = ConvertString(presence.spectateSecret);
            rich.instance       = presence.instance;

            RPC.Discord_UpdatePresence(ref rich);

            FreePointers(rich.state, rich.details, rich.largeImageKey, rich.largeImageText, rich.smallImageKey, rich.smallImageText, rich.matchSecret, rich.joinSecret, rich.spectateSecret);
        }
예제 #2
0
 internal static extern void Discord_UpdatePresence(ref DiscordRichPresence presence);