This project was originally created for my non-tech family to stay connected during COVID. I'm currently working on a few very demanding projects and do not have time to maintain this bot. I will continue to review and approve Pull Requests for issues if someone wants to keep it updated. I can also add a contributor if anyone is interested.
A Discord bot for hosting all 8 of the Jackbox Party pack games
This is not intended to be an official bot, this is just a project I threw together to help my family stay connected. There might be more sophisticated ways but this was a fairly quick project
JackBot is a hacky way to get a bot running and streaming games inside Discord. This can be beneficial if players are not in the same location and certain hosts do not have access to decent internet or a computer to run the game. It is intended to be hosted by someone with a little tech knowledge so the non-tech-savvy folks can enjoy these games if we're not available.
The premise is simple. Discord nor JackBox have native PowerShell integration so JackBot uses WScript to interact with the windows and navigate around the apps. It has a limited state capacity to keep track of its position inside the packs and apps at all times.
Technically it can work with any game that can be interacted with by keyboard commands. In its current form it only supports the JackBox Party Pack games. A kind individual has provided me with the rest of the Jackbox games which have now been integrated into the bot!
- AutomationTools integration - JackBot now uses AutomationTools for logging and config management. AutomationTools config features can now be used with the JackBot config seamlessly. You can read more about AutomationTools config features Here
- Command Locking - Enable command locking either by config or within the bot to ensure the person launching the game has sole control over the bot for X minutes
- Dynamic Command List - JackBot will now detect all games loaded and dynamically create the commands list for users. It supports any combination of Jackbox packs
- Configurable Splash Timings - Exposed Splash Screen timings to the config file in the event that some machines load slower
- Configurable Bot Name - You can now change the name that the bot uses to refer to itself
- Configurable Trigger Word - You can now change the trigger word the bot listens to for commands
When updating to this newest version you will have to add the following line into your config.json
file or AutomationTools will default the log file name.
"LogName":"JackBotLog",
You'll need a number of things to get this bot working correctly
- A Discord account that the bot will use to host the games
- A Discord server that you have Manage rights to so you can give the bot Read Message History permissions
- A Discord API Bot used to read text from channels
- OPTIONAL BUT RECOMMENDED: A secondary Steam account so the bot can run games without interfering with your personal account. You cannot run two games simultaneously
- A copy of Jackbox Party Pack games, the bot supports any combination of Jackbot Party Pack games
- A Windows machine to host the games from
Create a new Discord Account that the bot can use for hosting services. This account doesn't require any special permissions.
Create a new Discord server or use an existing one. The only requirement is that you have an account that has the Manage Server
roll, this is required to add the bot later. You can create a new server with this tutorial.
Copy the server name for later, we'll need it as DiscordServerName
- Enter your server in Discord and select
Server Settings
from the drop down. You can do this from any account that has theManage Server
role.
- Select
Webhooks
from the left hand navigation menu. - Select
Create Webhook
and fill out the details needed to proceed.
- Give the Webhook bot a name, and icon if you wish. This is the primary name of the bot the users will see, so I named mine JackBot.
- Copy the
Webhook URL
at the bottom of the creation/edit page, we will need it later asDiscordHook
.
The bot will remain in the channel but we're only using it to read messages. It's far easier to use webhooks for displaying messages.
- Create a new Application in the Discord Development Portal and name it whatever you'd like.
- Select
Bot
from the left hand navigation pane and copy theToken
, we'll need it later asDiscordToken
.
- Select
OAuth2
from the left hand navigation pane and selectbot
from theScopes
section.
- Select the permissions for the bot, you need
Read Message History
at a minimum. You can add more here if you'd like to add functionality but I didn't need it.
- Scroll back up to the
Scopes
section and copy the URL at the bottom ofScopes
. It should read something like the following:https://discordapp.com/api/oauth2/authorize?client_id=<YOUR BOT ID>&permissions=<YOUR PERMISSION NUMBER>&scope=bot
- Paste the above link into the browser and grant the bot permissions to the Discord server we made earlier. You will need to be logged in with an account that has the
Manage Server
role to the Discord server you're trying to add the bot to.
The Channel ID can be retrieved in the UI by enabling Developer Options.
- In the Discord app as the user with
Manage Server
role, select settings at the bottom.
- Select
Appearance
from the left hand navigation menu and scroll down until you seeAdvanced
.Turn on Developer Mode
.
- Navigate to the server that the bot has been added to, right click the text channel that you want the bot to listen in, and select
Copy ID
at the bottom. We'll need this later asDiscordTextChannelID
.
I'm running my bot on a Windows 10 VM on a spare machine I have in my house. The VM is running in VirtualBox as a service. It's important that whatever box you run the bot from is not running much of anything else. Definitely DO NOT run it on your normal-use machine. It will continuously grab your primary focus window.
I won't go into setting up and running the VM as that's outside the scope of the bot, but I'll give a few key details that need to be set if you're running inside a VM:
- 3D hardware acceleration.
- Access to Host audio.
- Enough CPU to run Jackbox and Discord stream (Discord stream hits the processor pretty good, but nothing most machines can't handle).
- 4GB of RAM recommended
- Access to the internet
No matter which machine you run it on, you need to ensure the following settings are set. These are well documented so I won't reinvent the wheel:
- Ensure Windows does not sleep
- (PowerShell) Set-ExecutionPolicy to unrestricted
- Disable the lock screen
- OPTIONAL: I set all Jackbox games to run in windowed mode, I find this helps on CPU usage and it barely makes a difference to the end users
You will need to install and log into the following items
- Log into the Steam account you want the bot to run under. Remember to check Remember Password
- Log into the Discord account you want the bot to stream from. Discord will stay logged in.
- Join the streaming account to the Discord server it will be streaming in.
- IMPORTANT: In Discord, as the streaming account, go to
Settings
>Keybinds
. You MUST add a keybinding forToggle Screen Share
and set the keybind toCTRL + ALT + L
or the stream will never activate.
Once all of the above items are in line you should be ready to configure and run the bot. You'll need the items we've gathered up until now to fill out the config.
- Download the files and unpack them to wherever you'd like the bot to run from. I've added path agnostic bat files so the location should not matter.
- Once downloaded copy
ConfigTemplate.JSON
, and rename it toConfig.JSON
. - Update
DiscordChannelName
with the name of the channel the bot will be streaming to.- Example:
general
- Example:
- Update the
DiscordServerName
with the name of the Discord Server the bot will be streaming to.- Example:
GameHost
- Example:
- Update the
DiscordTextChannelID
with theDiscordTextChannelID
we gathered earlier.- Example:
555555555555555555
- Example:
- Update the
DiscordToken
with theDiscordToken
we gathered earlier.- Example:
LKAJSHDLJAS_lakjshdliASD_olkjbsdlkhjASDlkjasbdjhGLKJ.DHblkasjd
- Example:
- Update the
DiscordHook
with theDiscordHook
we gathered earlier.- Example:
https://discordapp.com/api/webhooks/555555555555555555/kljhasd098uasDPOIASD897asiudhkjhbasd0AS&d9*ASYdijbsad
- Example:
- Place the desktop link created by Steam (
The Jackbox Party Pack 4.url
) for each Jackbox game into theJackBot\links
folder - Place the shortcut to Discord (named
Discord.lnk
) inside theJackBot\links
folder - Create a Windows Task to run
JackBot.bat
inside the bot folder. - Double Click
JackBot.bat
to start the bot manually.
-
The bot will dynamically detect and build a menu off each game listed in the JackBot\Links
-
If you do not have links you can generate them from Steam by right clicking on the game and selecting
Manage
>Add desktop shortcut
and moving that file to the \links folder. -
If you are upgrading the bot from the previous version be sure to copy
MessageCache.txt
from the old bot file and move it toJackBot\src\MessageCache.txt
. If you fail to do this your bot will process all the messages in the channel that the API returns. Alternatively you can right click the last message in your Discord channel, selectCopy ID
and paste it intoMessageCache.txt
. There should only be one line insideMessageCache.txt
and that line should always be the last message in the channel.
Field Name | Description | Example |
---|---|---|
BotName | The Display name of the bot, used for messages and the command list | JackBot |
LogName | The name of the log file that will be generated, this is now controlled by AutomationTools | JackBotLog |
TriggerKey | The trigger word the bot responds to | !jackbot |
CommandProcessConfirmation | Option to notify when each command has finished processing | true |
CommandLockEnabled | Enable to use the Command Lock feature at startup | true |
LockMinutes | The number of minutes a lock will be maintained for | 30 |
DiscordChannelName | The name of the channel the bot will stream to | general |
DiscordServerName | The name of the server the bot will connect to | GameHost |
DiscordLink | The windows path the bot will run Discord with | C:\\Path\\To\\Discord.lnk |
AvailableGames\Link | The link that the bot will use to launch the corresponding Jackbox game | C:\\Path\\To\\Pack.url |