Skip to content

Commit

Permalink
fix compiling with discord off
Browse files Browse the repository at this point in the history
  • Loading branch information
NexIsDumb committed Mar 26, 2024
1 parent 0c06bf7 commit 13d4d3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/funkin/backend/utils/DiscordUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ class DiscordUtil
public static var script:Script;

// Constants
#if DISCORD_RPC
public static var REPLY_NO:Int = Discord.REPLY_NO;
public static var REPLY_YES:Int = Discord.REPLY_YES;
public static var REPLY_IGNORE:Int = Discord.REPLY_IGNORE;
public static var PARTY_PRIVATE:Int = Discord.PARTY_PRIVATE;
public static var PARTY_PUBLIC:Int = Discord.PARTY_PUBLIC;
#end

public static function init()
{
Expand Down Expand Up @@ -408,6 +410,7 @@ final class DUser
{
}

#if DISCORD_RPC
public static function initRaw(req:cpp.RawConstPointer<DiscordUser>)
{
return init(cpp.ConstPointer.fromRaw(req).ptr);
Expand All @@ -431,6 +434,7 @@ final class DUser
d.handle = '${d.username}';
return d;
}
#end

/**
* Calling this function gets the BitmapData of the user
Expand Down

0 comments on commit 13d4d3e

Please sign in to comment.