Skip to content

Commit

Permalink
discord
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Nov 29, 2024
1 parent 301a072 commit e53d4ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<!-- Enables Support For Discord Client Integration -->
<define name="DISCORD_ALLOWED" if="desktop" unless="html5"/>

<define name="DISCORD_DISABLE_IO_THREAD" if="DISCORD_ALLOWED"/>

<!-- Enables Achievements -->
<define name="ACHIEVEMENTS_ALLOWED" />

Expand Down
9 changes: 5 additions & 4 deletions source/funkin/backend/client/Discord.hx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class DiscordClient
var localID:String = clientID;
while (localID == clientID)
{
#if DISCORD_DISABLE_IO_THREAD
Discord.UpdateConnection();
#end
Discord.RunCallbacks();

// Wait 0.5 seconds until the next loop...
Expand Down Expand Up @@ -150,10 +153,8 @@ class DiscordClient
presence.startTimestamp = Std.int(startTimestamp / 1000);
presence.endTimestamp = Std.int(endTimestamp / 1000);

if (presence.button1Label == null)
presence.button1Label = "Astro Engine Discord";
if (presence.button1Url == null)
presence.button1Url = "";
presence.button1Label = "Astro Engine Github";
presence.button1Url = "https://github.com/AstroEngineDevs/FNF-AstroEngine";

updatePresence();
}
Expand Down

0 comments on commit e53d4ea

Please sign in to comment.