Dead players tell no tales!
... and that's basically what this bot does.
This mod, in conjunction with it's Node Bot, mutes dead players for X seconds, or unil the end of the round in (Garry's Mod).
- Remote Node Bot (the node bot and the addon don't need to be on the same server, but they can be if you want).
- Secure & Authenticated connection, so no-one should be highjacking your bot communication.
- Discord Server link. When someone connects, they get told to join your server, if they're not already connected.
- Mute a Player for the entire round, or simply for a few seconds.
- Automatically connect players when they join your server. If a new player joins, they're on the Discord server already, and use the same name, they'll get connected without even prompting them.
- Language support (currently for player messages):
- English (Default)
- German
- ULX Support:
- Added Mute/Unmute in commands menu - Obviously, you can mute/unmute a player from the ULX menu
- Added Discord Settings
- "Settings" - You can change any of the Console Variables on a per Map basis.
- "Player Connections" - You can add a Steam/Discord ID connection from the ULX menu.
- Node Bot KeepAlive. Some bot hosts kill the bot if they don't get connections after a while. This option will keep the bot running, between sessions.
If you need a step-by-step tutorial, follow my guide at steam
- You have to have already installed a Garry's Mod Server with the TTT Gamemode.
- You must have a NodeJS installed locally on your GMod server, or on a publically accessable server (I used Heroku.com, which is the easier of the two options)
- First and formost, you need to go setup the Discord Bot, so...
- Go over to: manix84/discord_gmod_bot
- Setup your node server
The following assumes you're using Heroku.com. If not, please skip.
- Create a free account on Heroku.com.
- Create a pipeline, which deploys the Discord Gmod Bot
- Set the Environment Variables:
API_KEY
: (Optional, but super recommended) This MUST match the GMod server. It can be anything.DISCORD_GUILD
: A copy of the Server/Guild ID.DISCORD_CHANNEL
: A copy of the Voice Channel ID.- !If you're stuggling to get the Discord Guild/Channel ID, Discord have a guide to getting the ID's.
DISCORD_TOKEN
: This allows the node bot to talk to the Discord Bot (You will get this in Step 3 below)- To get the
DISCORD_TOKEN
, you'll need to create a Discord Bot. You'll need to follow these instructions to invite the bot, into your server. - Make sure you grant the bot the permissions to Mute Members.
- To get the
- Make sure the Node Bot server is running. Heroku will run is as a web instance.
- Install this Mod (I recommend using the Steam Workshop)
- If you don't want to use steam workshop, go over to: manix84/discord_gmod_addon and just extract the project into `/garrysmod/addons/discord'.
- Make sure you've got the
server convars
in/garrysmod/cfg/server.cfg
discord_endpoint
: The Node Bot remote endpoint (EG: https://my-awesome-discord-bot.herokuapp.com:443)discord_api_key
: This MUST match any value you set for the Node Bot.discord_server_link
: This is the share link that is advertised on your gmod server.discord_mute_round
: Do you want to mute the end of the round after death? (1=Yes, 0=No)discord_mute_duration
: How long do you want the player to be muted after death, in seconds. Does nothing ifdiscord_mute_round
is set to1
.discord_auto_connect
: If enabled, when an unknown player connects, it will try to match the Steam Nickname, to the Discord Nickname. (1=Enabled, 0=Disabled)
- You're all setup, so now, connect your Steam and Discord accounts:
- Connect your Steam Account with the bot by typing
!discord YourDiscordTag
in the ingame chat (E.G!discord Manix84
).- If you're having trouble, try your full discord name (E.G:
!discord Manix84#8429
). This should only be necessary if there are two or more people with the same name.
- If you're having trouble, try your full discord name (E.G:
- So long as you're in correct
DISCORD_GUILD
andDISCORD_CHANNEL
, the game state is in progress, you're connected to discord and you die in a supported GMod gamemode (TTT, TTT2 - Advanced Update, or Murder), the bot will mute you!
- Connect your Steam Account with the bot by typing
- Marcel Transier - The original creator of ttt_discord_bot, from which this is based.
- I used discord.js in this project. Thanks for the easy opportunity writing a discord bot in javascript!
- Thanks for the great Garry's Mod gamemode Trouble in Terrorist Town I made this bot for.
- Fork it (https://github.com/manix84/discord_gmod_addon/fork)
- Create your feature branch (
git checkout -b feature/featureName
) - Commit your changes (
git commit -am 'Add some featureName'
) - Push to the branch (
git push origin feature/featureName
) - Create a new Pull Request
- Just add a file into
/lua/locale/[language_name].lua
.- The translation tool will pick it up automatically.
- If you miss a translation key, they user will see "TRANSLATION MISSING", so... try to avoid that.
This project is licensed under the MIT License - see the LICENSE file for details