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!
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
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
Server Settings
from the drop down. You can do this from any account that has the Manage Server
role.Webhooks
from the left hand navigation menu.Create Webhook
and fill out the details needed to proceed.Webhook URL
at the bottom of the creation/edit page, we will need it later as DiscordHook
.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.
Bot
from the left hand navigation pane and copy the Token
, we'll need it later as DiscordToken
.OAuth2
from the left hand navigation pane and select bot
from the Scopes
section.Read Message History
at a minimum. You can add more here if you'd like to add functionality but I didn't need it.Scopes
section and copy the URL at the bottom of Scopes
. It should read something like the following:
https://discordapp.com/api/oauth2/authorize?client_id=<YOUR BOT ID>&permissions=<YOUR PERMISSION NUMBER>&scope=bot
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.
Manage Server
role, select settings at the bottom.Appearance
from the left hand navigation menu and scroll down until you see Advanced
. Turn on Developer Mode
.Copy ID
at the bottom. We'll need this later as DiscordTextChannelID
.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:
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:
You will need to install and log into the following items
Settings
> Keybinds
. You MUST add a keybinding for Toggle Screen Share
and set the keybind to CTRL + 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.
ConfigTemplate.JSON
, and rename it to Config.JSON
. DiscordChannelName
with the name of the channel the bot will be streaming to.
general
DiscordServerName
with the name of the Discord Server the bot will be streaming to.
GameHost
DiscordTextChannelID
with the DiscordTextChannelID
we gathered earlier.
555555555555555555
DiscordToken
with the DiscordToken
we gathered earlier.
LKAJSHDLJAS_lakjshdliASD_olkjbsdlkhjASDlkjasbdjhGLKJ.DHblkasjd
DiscordHook
with the DiscordHook
we gathered earlier.
https://discordapp.com/api/webhooks/555555555555555555/kljhasd098uasDPOIASD897asiudhkjhbasd0AS&d9*ASYdijbsad
The Jackbox Party Pack 4.url
) for each Jackbox game into the JackBot\links
folderDiscord.lnk
) inside the JackBot\links
folderJackBot.bat
inside the bot folder.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 to JackBot\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, select Copy ID
and paste it into MessageCache.txt
. There should only be one line inside MessageCache.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 |