Exemplo n.º 1
0
        public static void Update()
        {
            var instance = GetInstance();

            DiscordWrapper.DiscordRunCallbacks();
            DiscordWrapper.DiscordUpdatePresence(currentPresence);
        }
Exemplo n.º 2
0
 public static void Init()
 {
     Logging.Write("Initializing Discord");
     DiscordWrapper.EventHandlers eventHandlers = new DiscordWrapper.EventHandlers()
     {
         errored      = OnErrored,
         joinGame     = OnJoinGame,
         joinRequest  = OnJoinRequest,
         spectateGame = OnSpectateGame,
         ready        = OnReady
     };
     Logging.Write("Discord client ID: " + BaseGame.gameProperties.discordClientID);
     DiscordWrapper.DiscordInitialize(BaseGame.gameProperties.discordClientID, ref eventHandlers);
 }
Exemplo n.º 3
0
 public static void Shutdown()
 {
     Logging.Write("Shutting down Discord RPC");
     System.Threading.Thread.Sleep(500);
     DiscordWrapper.DiscordShutdown();
 }