Skip to content

LenofagIndustries/LRelaySockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Open issues Release Downloads Join my Discord server!

LRelaySockets

Integrate your Garry's Mod server with Discord

What this relay can do:

  • Connect your Discord and game's chats
  • Send console output to Discord and run console commands
  • Server status and player info Web API
  • Lua API - make your own Discord commands

Dependencies

node.js

  • axios@0.27.2
  • steamid@2.0.0
  • discord.js@13.6.0
  • express@4.17.3
  • express-ws@5.0.2

Garry's Mod

Installation

  1. Clone this repository
  2. Install npm dependencies using npm i
  3. Install modules from Dependencies to server's garrysmod/lua/bin
  4. Drop lrelaysockets folder to your server's garrysmod/addons folder
  5. Configure your installation
  6. Done!

Configuration

  1. Open config.js
  2. Here you will need to set channel IDs, Discord token and an LRELAY key, which serves as a password, you can set it to anything!
  3. Open addons/lrelaysockets/lua/autorun/server/sv_config.lua
  4. Change socketPath, which should look something like ws://123.45.6.7:8556/relay
  5. Change token to your LRELAY key, which you set earlier at config.js as auth
  6. Change consoleAccess to your Discord user ID, you can add additional user IDs
  7. (optional) Change statusName to whatever name you want for server status API

Credits

This relay is created specifically for Sandbox gamemode!
You will need to modify it yourself to make it work for DarkRP, TTT, etc