Banner and Bot profile picture courtesy of Smiles!
Discord Bot to harness Among Us game data, and automatically mute/unmute players during the course of the game!
Works in conjunction with amonguscapture
This program is in Beta. While we are confident about the basic functionality, there will still be issues or pecularities with how the program functions! We are actively working to resolve these issues!
Have any questions, concerns, bug reports, or just want to chat? Join the discord at https://discord.gg/ZkqZSWF!
- The Capture application only supports the NON-BETA OFFICIAL STEAM release of the game
- This program must be run on a Windows PC, in Heroku, or in a Docker instance. The program CANNOT be run directly on mobile phones.
- You need a minimum of 12 open emoji slots on your server. The bot uses player emojis to link discord users to in-game player colors; it will add them automatically, but you need at least 12 slots (25 recommended).
- You must run the discord bot, and the capture portion (See Easiest installation below) at the same time. Easiest installation covers running the bot portion locally, but feel free to use Heroku or Docker or the like to host the bot remotely.
If you followed all the steps in the video above, you're done with the installation and can start using the bot, or see the Usage/Commands sections below! If you prefer text instructions over videos, follow all the instructions below instead.
- Create an Application and Bot account for your Discord Server (requires Admin privileges on the Server in question).
- Follow the instructions HERE
Now follow either the Easiest
install, or the Install From Source
:
- Download the latest release executable (
.exe
) andfinal.txt
for this discord bot. If you don't see one for the current version, then simply create a new text document calledfinal.txt
, and putDISCORD_BOT_TOKEN =
as the contents. - Paste the Bot Token you obtained in the pre-installation into the
final.txt
file, after the=
sign for theDISCORD_BOT_TOKEN
. - Run the executable from step 1, either by double-clicking or using
./amongusdiscord.exe
in a terminal window. - Download the latest
amonguscapture.exe
. - Start Among Us and host a game or join a game.
- Automatically start capture by issuing the
.au n
(or.au new
) command to the bot via Discord. The bot will send you a Direct Message with a link like: aucapture://:8123/?insecure. Click this link and the capture executable will automatically be launched. Alternatively, manually start the capture executable from step 4 and type in the Connect Code from amongusdiscord.exe (should be 8 characters long), Connect, and issue the bot the command .au n(ew) via Discord. - Have fun and enjoy!
Congrats, if you followed the instructions correctly, the bot should now be running! See the Sample Usage section below for details.
- Install Go 1.15.2, but any version of Go 1.12+ should work.
- Clone the repository using
git clone https://github.com/denverquane/amongusdiscord
. - Navigate to the directory with
cd amongusdiscord
, and then build the executable usinggo build -o amongusdiscord.exe main.go
. - Proceed to steps 2-5 of the
Easiest
install section above.
Remote usage (Capture app and bot app running on seperate networks) is possible with AutoMuteUs however it is recommended only for those familiar with advanced networking topics such as Static IPs, Dynamic DNS, and Port Mappings. If you are not already comfortable with these topics it is not recommended that you attempt to set up remote use. If you wish to have remote users run the capture app then you will need the following:
- The computer hosting the bot must have a static IP on your local network (preferably outside your DHCP pool, or have a reserved IP address).
- You must create a port mapping on your router to map port 8123 to your bot host (UniFi users please note that the current UniFi controller does not enable new port mappings by default)
- Unless you have a static IP from your ISP you will need a dynamic DNS service such as DuckDNS, Afraid, or No-IP. You will also need that service set up to automatically update your IP when it changes.
You can also run the discord portion using docker if you prefer, it simply needs the port 8123
exposed, and you should provide your DISCORD_BOT_TOKEN
as an env variable.
Example:
docker run -p 8123:8123 -e DISCORD_BOT_TOKEN=<YourTokenHere> denverquane/amongusdiscord
AutoMuteUs is now available in Community Applications for unRAID. Install the Community Applications plugin for unRAID then search for AutoMuteUs in the Apps section. Fill out the template with the Docker Environment Variables that are detailed here and in the template.
DISCORD_BOT_TOKEN
: The Bot Token used by the bot to authenticate with Discord.DISCORD_BOT_TOKEN_2
: (Optional) A second Bot Token to be used to distribute the mute/deafen requests to Discord. If you play in larger groups of 8+ people, this is recommended to not be rate-limited (delayed) by Discord when rounds change!
EMOJI_GUILD_ID
: If your bot is a member of multiple guilds, this ID can be used to specify the single guild that it should use for emojis (no need to add the emojis to ALL servers).PORT
: The internal port the Bot will use for incoming Socket.io communications. Defaults to 8123.HOST
: The externally-accessible URL for the discord bot. For example,http://test.com:8123
. This is used to provide the linking URI to the capture, via the Direct Message the bot sends you when typing.au new
. You must specifyhttp://
orhttps://
accordingly, and specify the port if non-8123. For example,https://your-app.herokuapp.com:443
SERVICE_PORT
: Port used for graceful shutdowns and stats via HTTP GET. Defaults to 5000CONFIG_PATH
: Alternate filesystem path for guild and user config files. Defaults to./
LOG_PATH
: Filesystem path for log files. Defaults to./
CAPTURE_TIMEOUT
: How many seconds of no capture events received before the Bot will terminate the associated game/connection. Defaults to 600 seconds.
NUM_SHARDS
: Num shards provided to the Discord API.SHARD_ID
: Shard ID used to identify with the Discord API. Needs to be strictly less thanNUM_SHARDS
-
Navigate to your Heroku app dashboard
-
Go to Settings
-
Click on Reveal Config Vars
-
Ensure the following is populated DISCORD_BOT_TOKEN = xxx EXT_PORT = 443 GOVERSION = 1.15 PORT = 443 HOST = https://your-app.herokuapp.com:443 (Click on open app if you are unsure. Be sure to remove the space and ensure no slash "/" at the end, this fixed it for me)
-
Check the app's logs. See if it is up and running with no issues.
-
You should see your bot in discord. Issue a .au n(ew) command and click the link in the direct message from the bot. If you haven't already download the capture app and .Net Core install.
-
The link should connect the capture.exe to your bot and Discord will show your game in it's assigned text channel.
To start the bot in the current channel, type the following .au
command in Discord:
.au new
# Starts a game, and allows users to react to emojis to link to their in-game players
Get Playing!
If you want to view command usage or see the available options, type .au
or .au help
in your Discord channel.
The Discord Bot uses the .au
prefix for any commands
Command | Alias | Arguments | Description | Example |
---|---|---|---|---|
.au help |
.au h |
None | Print help info and command usage | |
.au new |
.au n |
None | Start a new game in the current text channel. Optionally accepts the room code and region | .au n CODE eu |
.au track |
.au t |
VC Name | Tell Bot to use a single voice channel for mute/unmute, and ignore any other channels | .au t Test Voice |
.au link |
.au l |
@name color | Manually link a discord user to their in-game color | .au l @Soup cyan |
.au refresh |
.au r |
None | Remake the bot's status message entirely, in case it ends up too far up in the chat. | |
.au end |
.au e |
None | End the game entirely, and stop tracking players. Unmutes all and resets state | |
.au unlink |
.au u |
@name | Manually unlink a player | .au u @player |
.au settings |
.au s |
View and change settings for the bot, such as the command prefix or mute behavior | ||
.au force |
.au f |
stage | Force a transition to a stage if you encounter a problem in the state | .au f task or .au f d (discuss) |
.au pause |
.au p |
Pause the bot, and don't let it automute anyone until unpaused. will not un-mute muted players, be careful! | ||
.au log |
message | Issue a small log message that will help you find the message later, if a problem occurs | .au log Something bad happened |
-
Imposter: Similar bot that uses private Discord channels instead of mute/deafen. Also uses a dummy player joining the game and "spectating" to get game information; no capture needed (although loses the 10th player slot).
-
AmongUsBot: Without their original Python program with a lot of the OCR/Discord functionality, I never would have even thought of this idea! Not currently maintained
-
amongcord: A great program for tracking player status and auto mute/unmute in Among Us. Their project works like a traditional Discord bot; very easy installation!
-
Silence Among Us: Another bot quite similar to this one, which also uses AmongUsCapture. Now in early-access with a publicly-hosted instance.
-
"Websocket 400-something: Authentication Failed" Error! Your
DISCORD_BOT_TOKEN
is incorrect or invalid. Make sure you copied/pasted the Bot token, NOT the "client secret" from the Discord Developer portal -
"Emoji ID is not a snowflake" Error! Or the bot doesn't provide emojis as reactions on the status message! The discord API is agonizingly slow to upload new emojis, inform bots about the presence of new/updated emojis, and delete emojis. The easiest answer is to give it a while (sometimes can take almost 30 minutes), and try again.