Adding user object to READY event (#159)

* Pass the READY event data down in onConnect

* Changes made for UE4 and Unity wrappers

* Changing object name from joinRequest to DiscordUser
This commit is contained in:
Mason Sciotti
2018-04-16 10:25:44 -07:00
committed by GitHub
parent 2ce9fe068b
commit 64027b336f
10 changed files with 97 additions and 56 deletions

View File

@ -6,7 +6,7 @@ using System.Text;
public class DiscordRpc
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ReadyCallback();
public delegate void ReadyCallback(ref DiscordUser connectedUser);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void DisconnectedCallback(int errorCode, string message);
@ -21,7 +21,7 @@ public class DiscordRpc
public delegate void SpectateCallback(string secret);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void RequestCallback(ref JoinRequest request);
public delegate void RequestCallback(ref DiscordUser request);
public struct EventHandlers
{
@ -54,7 +54,7 @@ public class DiscordRpc
}
[Serializable]
public struct JoinRequest
public struct DiscordUser
{
public string userId;
public string username;