A cowsay discord bot written in python
- Create a Discord bot. You can follow tutorials such as this. You need the token of the bot for later steps.
- Obtain the guild ID of all the servers your bot will join.
- Follow this post to invite your bot to a server: https://stackoverflow.com/a/37743722
- Create and activate
venv
:python3 -m venv .venv && . .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Define environment variables:
TOKEN="your token"
andGUILD_IDS="guild IDs separated by comma"
. You can use a.env
file or pass it directly to cowsay-bot.py - Star the bot:
./cowsay-bot.py
docker build -t "cowsay-bot" .
docker run -e "TOKEN=your token" -e "GUILD_IDS=guild IDs separated by comma" --name "cowsay-bot" cowsay-bot