Advertisement
EESweetieBot

Untitled

May 13th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.65 KB | None | 0 0
  1.  static async void MainAsync()
  2.         {
  3.             #region RPC
  4.             Console.WriteLine("Setting up RPC");
  5.             rpc = new RpcClient("445101504546734080");
  6.             rpc.ClientErrored += async (e) =>
  7.             {
  8.                 Console.WriteLine("RPC Error! " + e.Exception);
  9.             };
  10.             rpc.ConnectionClosed += async (e) =>
  11.             {
  12.                 Console.WriteLine("RPC Disconnected!");
  13.             };
  14.             rpc.Ready += async (e) =>
  15.             {
  16.                 Console.WriteLine("RPC Ready!");
  17.                 await rpc.SetActivityAsync(x =>
  18.                 {
  19.                     x.Details = "Idle";
  20.                     x.LargeImage = "notitglogolarge";
  21.                     x.LargeImageText = "NotITG";
  22.                    
  23.                 });
  24.             };
  25.             Console.WriteLine("Connecting RPC!");
  26.             await rpc.ConnectAsync();
  27.             #endregion RPC
  28.             //
  29.             #region NotITG
  30.             // SETUP
  31.             /*nitg = new NITGCommunicator("NotITGv3");
  32.             //
  33.             var t = new System.Timers.Timer();
  34.             t.Elapsed += NotITGTick;
  35.             t.Interval = 20;
  36.             t.Enabled = true;
  37.             t.Start();*/
  38.             Console.ReadLine();
  39.             Console.WriteLine("Changing state...");
  40.             await rpc.SetActivityAsync(x =>
  41.             {
  42.                 x.Details = "IDLE2OMGJUSTCHANGEACTIVITYALREADY";
  43.                 x.LargeImage = "notitglogolarge";
  44.                 x.LargeImageText = "NotITG";
  45.  
  46.             });
  47.             Console.WriteLine("Finished setting up NotITG Handler!");
  48.             #endregion
  49.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement