This is the template for a bot that blocks any specified words in your Discord server.
- Download Python from the website
- Open Windows Terminal or PowerShell
- Clone the repository and cd into it:
git clone https://github.com/owengaspard/discord.py-blocked-words-bot.git && cd discord.py-blocked-words-bot
- Install pyenv: `pip install pyenv'
- Create a virtual environment (venv) and activate it:
python3 -m venv bot && bot\Scripts\activate.bat
- Install Discord.py:
pip install discord.js
- Add your token to the
botToken
file - Run the bot:
python3 ./main.py
- Ether download Python from here or download it using Homebrew:
brew install python3 pip
- Clone the repository and cd into it:
git clone https://github.com/owengaspard/discord.py-blocked-words-bot.git && cd discord.py-blocked-words-bot
- Install pyenv: `pip install pyenv'
- Create a virtual environment (venv) and activate it:
python3 -m venv bot && source bot/bin/activate
- Install Discord.py:
pip install discord.js
- Add your token to the
botToken
file - Run the bot:
python3 main.py
The blocklist is in the main.py
file. Look for the variable blockedWords
, and change the words to whatever you desire.
When you add words, put them in quotes ("") and add a comma at the end of it only if you are adding another word under it. Do not add a comma if it is the last word in the list (Python doesn't care, but JSON files do care).