-
Notifications
You must be signed in to change notification settings - Fork 23
Discord Notifications
You can enable Discord notifications for report events and have them sent to a specific channel in your Discord server.
The following events will result in a Discord notification:
- Report Submitted
- Report Forgiven
- Report Kept
- Report Finished (by an admin)
- Report Conclusion Changed (by an admin)
Badger reports Bot01:
Bot01 responds, but Badger decides to keep the report:
The admin Badger handles the report and sets the status to "Finished":
For more examples, see this imgur album.
Discord blocks requests from Garry's Mod clients/servers using the built-in HTTP capabilities.
You must the CHTTP Lua module (recommended) or use a proxy HTTP server (hard).
- Go to https://github.com/timschumi/gmod-chttp/releases
- Download the correct version
- If you are running on a Windows server, on the 32-bit Gmod branch (currently the default branch for servers)
- Download
gmsv_chttp_win32.dll
- Download
- If you are running on a Windows server, on the x86-64 Gmod branch
- Download
gmsv_chttp_win64.dll
- Download
- If you are running on a Linux server, on the 32-bit Gmod branch (currently the default branch for servers)
- Download
gmsv_chttp_linux.dll
- Download
- If you are running on a Linux server, on the x86-64 Gmod branch
- Download
gmsv_chttp_linux64.dll
- Download
- If you are running on a Windows server, on the 32-bit Gmod branch (currently the default branch for servers)
- If it does not already exist in your server's files, create the
garrysmod/lua/bin/
folder on your server.- E.g. If your Garry's Mod server is located at
myserver/garrysmod/gameinfo.txt
- Then this folder should be made at
myserver/garrysmod/lua/bin
- E.g. If your Garry's Mod server is located at
- Drop the file you downloaded into this folder
Thanks to GMod Store for this guide.
You must have edit channel permissions
- In Discord, right click on the channel you want notifications to appear in
- Select Edit Channel
- Go to Integrations
- View Webhooks
- New Webhook
- Fill in the information and click "Copy Webhook URL"
The webhook URL should look something like https://discord.com/api/webhooks/700000000123456789/EXAMPLEEXAMPLEEXAMPLE
- Open the file
garrysmod/cfg/server.cfg
on your server. - Add the line -
ttt_dmglogs_discordurl "https://discord.com/api/webhooks/700000000123456789/EXAMPLEEXAMPLEEXAMPLE"
- Replace
https://discord.com/api/webhooks/700000000123456789/EXAMPLEEXAMPLEEXAMPLE
with the Discord Webhook URL in step 2.
Open the configuration file for the damage logs addon:
garrysmod/data/damagelog/config.json
Find the following line:
"DiscordWebhookMode": 0.0,
And replace it with:
"DiscordWebhookMode": 2,
If you only want report notifications when there are no admins online, replace the line above with:
"DiscordWebhookMode": 1,
If you don't want to use the CHTTP module, you can proxy your Discord notifications through a website.
GMod server => Website => Discord API
This requires some experience with creating web services.
In garrysmod/cfg/server.cfg
, set the ttt_dmglogs_discordurl
to your proxy website URL.
E.g.
ttt_dmglogs_discordurl "https://example.com/report-notifications"