コード例 #1
0
 public void UpdatePresence(string Game)
 {
     RPC_RichPresence.details       = Game != "Menus" ? "Playstation 2 (PCSX2)" : null;
     RPC_RichPresence.state         = Game;
     RPC_RichPresence.largeImageKey = "menus";
     RPCLibrary.UpdatePresence(ref RPC_RichPresence);
     Console.WriteLine("Discord Presence Updated");
 }
コード例 #2
0
        private void Initialize()
        {
            RPC_EventHandlers = new RPCLibrary.EventHandlers();

            RPC_EventHandlers.readyCallback        += ReadyCallback;
            RPC_EventHandlers.disconnectedCallback += DisconnectCallback;
            RPC_EventHandlers.errorCallback        += ErrorCallback;

            RPCLibrary.Initialize(ClientID, ref RPC_EventHandlers, true, null);

            Console.WriteLine("Discord Rich Presence Initialized.");
        }