summaryrefslogtreecommitdiff
path: root/Assets/Plugins/DiscordGameSDK/LobbyManager.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-12-05 13:18:39 -0500
committerAndrew Lee <alee14498@protonmail.com>2020-12-05 13:18:39 -0500
commit0f7e3ced25ee1138980f4ddfcb37e45fbc54bead (patch)
tree33f34ab33f1af5bb3413372030ef25642eedded1 /Assets/Plugins/DiscordGameSDK/LobbyManager.cs
parentdf8769c71a03c4fc47945e39eed16d500f82ad71 (diff)
downloadProject-Sandbox-0f7e3ced25ee1138980f4ddfcb37e45fbc54bead.tar.gz
Project-Sandbox-0f7e3ced25ee1138980f4ddfcb37e45fbc54bead.tar.bz2
Project-Sandbox-0f7e3ced25ee1138980f4ddfcb37e45fbc54bead.zip
Discord RPC; Removed jumping function for now
Diffstat (limited to 'Assets/Plugins/DiscordGameSDK/LobbyManager.cs')
-rw-r--r--Assets/Plugins/DiscordGameSDK/LobbyManager.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Assets/Plugins/DiscordGameSDK/LobbyManager.cs b/Assets/Plugins/DiscordGameSDK/LobbyManager.cs
new file mode 100644
index 0000000..c914ba8
--- /dev/null
+++ b/Assets/Plugins/DiscordGameSDK/LobbyManager.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Discord
+{
+ public partial class LobbyManager
+ {
+ public IEnumerable<User> GetMemberUsers(Int64 lobbyID)
+ {
+ var memberCount = MemberCount(lobbyID);
+ var members = new List<User>();
+ for (var i = 0; i < memberCount; i++)
+ {
+ members.Add(GetMemberUser(lobbyID, GetMemberUserId(lobbyID, i)));
+ }
+ return members;
+ }
+
+ public void SendLobbyMessage(Int64 lobbyID, string data, SendLobbyMessageHandler handler)
+ {
+ SendLobbyMessage(lobbyID, Encoding.UTF8.GetBytes(data), handler);
+ }
+ }
+}