Commit c8248c5e authored by zero's avatar zero 💩

Added README.md

parent d57e3354
## Discord RPC over HTTP
This is a simple utility that makes Rich Presence available over HTTP and handling leaving the game etc.
If you are using Garry's Mod, you will need to modify the gmod_discordrpc Lua code slightly for this to work.
In discordrpc.Init change the following from
```lua
for port = 6463, 6473 do
```
To
```lua
for port = 9000, 9000 do
```
At the end, change the following
```lua
function discordrpc.Shutdown()
for pid, active in next, pids do
if active then
discordrpc.SetActivity(nil, function()
pids[pid] = false
end, pid) -- reset all of our rich presences
end
end
end
```
to
```lua
function discordrpc.Shutdown()
http.Fetch(string.format("http://127.0.0.1:%s/shutdown", discordrpc.port))
end
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment