diff --git a/libs/discord-rpc.dylib b/libs/discord-rpc.dylib new file mode 100644 index 0000000..f01acd6 Binary files /dev/null and b/libs/discord-rpc.dylib differ diff --git a/load/rpc.lua b/load/rpc.lua index ba4ab2f..b3de9ea 100644 --- a/load/rpc.lua +++ b/load/rpc.lua @@ -34,15 +34,6 @@ if success then RPC.initialize(DiscordRPC.appId, true) local now = os.time(os.date("*t")) - RPC.updatePresence({ - startTimestamp = now, - details = "Loading game...", - state = "", - largeImageKey = "icon2", - largeImageText = "Original game by Joe Zeng", - smallImageKey = "", - smallImageText = "" - }) DiscordRPC.RPC = RPC print("DiscordRPC successfully loaded.") @@ -51,6 +42,17 @@ else print(RPC) end +DiscordRPC.presence = { + startTimestamp = now, + details = "Loading game...", + state = "", + largeImageKey = "icon2", + largeImageText = "Original game by Joe Zeng", + smallImageKey = "", + smallImageText = "" +} + function DiscordRPC:update(newstuff) - if self.loaded then self.RPC.updatePresence(newstuff) end -end \ No newline at end of file + for k, v in pairs(newstuff) do self.presence[k] = v end + if self.loaded then self.RPC.updatePresence(self.presence) end +end