From 7d17cc92fcbdef7c686d44ad58e27cceaa006157 Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Sun, 24 Mar 2024 20:42:49 +0100 Subject: [PATCH] Improvement to changePresenceSince --- source/funkin/backend/utils/DiscordUtil.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/funkin/backend/utils/DiscordUtil.hx b/source/funkin/backend/utils/DiscordUtil.hx index 783417e0..aa0e5657 100644 --- a/source/funkin/backend/utils/DiscordUtil.hx +++ b/source/funkin/backend/utils/DiscordUtil.hx @@ -148,16 +148,17 @@ class DiscordUtil #end } - public static function changePresenceSince(details:String, state:String, ?smallImageKey:String, ?offset:Float = 0) + public static function changePresenceSince(details:String, state:String, ?smallImageKey:String, ?time:Null = null) { #if DISCORD_RPC - var start:Float = Date.now().getTime() + offset; + if(time == null) + time = Date.now().getTime(); changePresenceAdvanced({ state: state, details: details, smallImageKey: smallImageKey, - startTimestamp: Std.int(start / 1000) + startTimestamp: Std.int(time / 1000) }); #end }