Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 166010a

Browse files
committed
Add Discord Timestamp
1 parent ec08cfa commit 166010a

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public static class Program
2727

2828
public static bool RCCKMade = false;
2929
public static DiscordRpcClient discordClient = new DiscordRpcClient("692110664948514836");
30+
public static Timestamps discordTime = Timestamps.Now;
31+
3032
[STAThread]
3133
public static void Main(string[] args)
3234
{
@@ -36,7 +38,8 @@ public static void Main(string[] args)
3638
// Set default presence
3739
discordClient.SetPresence(new RichPresence()
3840
{
39-
State = "Test of SourcePawn",
41+
State = "Idle",
42+
Timestamps = discordTime,
4043
Assets = new Assets()
4144
{
4245
LargeImageKey = "immagine",

UI/MainWindow.xaml.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,6 @@ public void AddEditorElement(string filePath, string name, bool SelectMe)
175175
if (SelectMe)
176176
{
177177
layoutDocument.IsSelected = true;
178-
Program.discordClient.SetPresence(new RichPresence()
179-
{
180-
Details = "Doing SPEdit",
181-
State = $"Editing {name}",
182-
Assets = new Assets()
183-
{
184-
LargeImageKey = "immagine",
185-
LargeImageText = "Just a Prank",
186-
}
187-
});
188178
}
189179
}
190180

@@ -197,12 +187,12 @@ private void DockingManager_ActiveContentChanged(object sender, EventArgs e)
197187
ee.editor.Focus();
198188
Program.discordClient.SetPresence(new RichPresence()
199189
{
200-
Details = "Doing SPEdit",
190+
Timestamps = Program.discordTime,
201191
State = $"Editing {Path.GetFileName(ee.FullFilePath)}",
202192
Assets = new Assets()
203193
{
204194
LargeImageKey = "immagine",
205-
LargeImageText = "Just a Prank",
195+
LargeImageText = $"Editing {Path.GetFileName(ee.FullFilePath)}",
206196
}
207197
});
208198
}

0 commit comments

Comments
 (0)