Tenrys / gmod_discordrpc

DEPRECATED - Discord Rich Presence support for Garry's Mod!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEPRECATED

Discord Rich Presence support for Garry's Mod!

Notice: This script is completely safe and won't get you banned from Discord.

How does it work?

This script makes your game client send HTTP requests to your Discord client's RPC server in order to change your Rich Presence according to what you feed it.

It is completely clientside and your server won't have anything to do with the add-on except serving the files for your players, so no weird server HTTP requests to be worrying about!

Installation, usage

Recommended:

  1. Clone the repository or simply download its latest version.
  2. Extract the contents of the zip file you downloaded in the addons folder located in your game's installation directory. (Default, on Windows: C:\Program Files (x86\Steam\steamapps\common\Garry's Mod\garrysmod). You can remove the img directory from the add-on's folder, it's only used for providing images in this file. (Might cause issues while trying to pull if you cloned this repository though)
  3. Setup your own Discord application, and grab its client ID.
  4. Put the client ID you got for the discordrpc.clientID value.

You'll probably want to make a custom state for your server / gamemode, I recommend you look at the default.lua and example.lua states for an idea of how that works.

Support

This should work flawlessly on any version of Discord and Garry's Mod. If it doesn't, don't hesitate to create an issue. If the script ends up creating Lua errors internally (not caused by your custom states logic), please create an issue with the error and the output from your console around [Discord RPC] stuff. This applies to the default state too, if it breaks, tell me.

Known bugs

  • None!

Credits

  • Tenrys, came up with the idea after working on the original CS:GO Discord Rich Presence program and started research
  • SpiralP, helped a GOOD bit with research on the subject and supplied starting code to build upon

About

DEPRECATED - Discord Rich Presence support for Garry's Mod!

License:GNU General Public License v3.0


Languages

Language:Lua 100.0%