Inspired by Ludwig's popcorn castle "BOIS!" video intro.
BOIS is a Discord bot that plays a sound when you join a voice channel.
The bot was implemented before Discord allowed Nitro users to play a sound from a server soundboard when joining.
- Go to the Discord Developer Portal.
- Click on "New Application" and give it a name.
- Go to the "Bot" tab and click "Add Bot".
- Copy the token and save it for later.
- Go to the "OAuth2" tab and select the "bot" scope.
- Select the
View Channels,Connect, andSpeakpermissions. Copy the generated URL and paste it into your browser. - Select the server you want to add the bot to and click "Authorize".
-
Clone the repository
git clone https://github.com/jstnf/BOIS/
-
Using
example.envas a template, create a.envfile in the root directory of the project and fill in the fields.cp example.env .env
Field Description BOT_TOKENThe token of your Discord bot MEMBER_IDThe ID of the user joining VC SOUND_FILE_PATHThe OS file path to the sound file
If you have Docker and make installed, you can use the following commands to run the bot.
| Command | Description |
|---|---|
make docker |
Builds the Docker image. The image is tagged as bois. |
make run |
Runs the Docker container. The command will look for a .env file in the repo directory. |
You can also use the following instructions to set up your own Python environment and run the BOIS bot.
-
Install FFmpeg
FFmpeg is a well-known, open-source audio processor. BOIS uses discord.py which requires FFmpeg in order to play audio.
-
Create a Python virtual environment and install
requirements.txtpython -m venv venv source venv/bin/activate pip install -r requirements.txt -
Run the bot!
python bois/main.py