manix84 / discord_gmod_bot

Dead players can't talk! - Companion Bot to GMod Addon for Muting Dead Players in Discord Sever.
MIT License
11 stars 118 forks source link

Discord Muter for GMod (The Node Bot)

Icon

Dead players tell no tales!

... and that's basically what this bot does.

price gmod-addon discord-bot license

This mod, in conjunction with the GMod Addon, mutes dead players for X seconds, or unil the end of the round in (Garry's Mod).

Features

Getting Started

If you need a step-by-step tutorial, follow my guide at steam

Prerequisites

Usage

  1. First and formost, you need to go setup the Discord Bot, so...
    • 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.
    • Make sure the Node Bot server is running. Heroku will run is as a web instance.
    • If configuring the Discord Bot on the same server as the Garry's Mod Server (i.e. it'll connect to localhost), add -allowlocalhttp to the srcds launch options.
  2. 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'.
  3. 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 if discord_mute_round is set to 1.
    • 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)
  4. 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.
    • So long as you're in correct DISCORD_GUILD and DISCORD_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!

Credits

Contributing

  1. Fork it (https://github.com/manix84/discord_gmod_addon/fork)
  2. Create your feature branch (git checkout -b feature/featureName)
  3. Commit your changes (git commit -am 'Add some featureName')
  4. Push to the branch (git push origin feature/featureName)
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details

Screenshots

ULX Commands

ULX Cmds

ULX Settings - Settings

ULX Settings - Settings

ULX Settings - Player Connections

ULX Settings - Player Connections

Muting in action

Muting in action