This is a Python program for a Discord counting bot.
Please note that this bot is a personal project and that support is not guaranteed. Feel free to fork the repository and modify the code to suit your needs.
If you encounter any issues, you can open an issue on GitHub, and I will try to address it when I have time to do so.
You can also submit a pull request if you have a fix or an improvement that you would like to contribute, but I cannot guarantee that it will be accepted.
- Users can count numbers in a Discord channel.
- Recognizes when a user counts two numbers in a row and resets the count.
- Automatically resets the count if a user makes a mistake.
- Records the highest count achieved by users.
-
Clone the repository:
git clone https://github.com/Sprial404/charlie.git
-
Install the dependencies using pip:
pip install -r requirements.txt
-
Make sure you have Python 3.12 installed.
-
Create a
.env
file in the root directory of the project with the following content:TOKEN=your-discord-bot-token CHANNEL_ID=your-discord-counting-channel-id
Replace
your-discord-bot-token
with your actual Discord bot token andyour-discord-counting-channel-id
with the ID of the Discord channel where you want the bot to operate.To get the channel ID, enable Developer Mode in Discord settings, right-click on the channel, and select "Copy ID".
-
Run the program using the following command:
python -m charlie.bot
-
Install Docker and Docker Compose.
-
Create a
docker-compose.yml
file with the following content:version: '3' services: bot: build: . volumes: - ./data:/app/data environment: - TOKEN=your-discord-bot-token - CHANNEL_ID=your-discord-counting-channel-id
-
Replace
your-discord-bot-token
with your actual Discord bot token andyour-discord-counting-channel-id
with the ID of the Discord channel where you want the bot to operate.To get the channel ID, enable Developer Mode in Discord settings, right-click on the channel, and select "Copy ID".
-
Run the following command to start the bot using Docker Compose:
docker-compose up -d
-
The bot will be running inside a Docker container. The
data
directory will be mounted as a volume, allowing you to persist data across container restarts.
If you prefer to use a named volume instead of a bind mount, you can modify the volumes
section in
the docker-compose.yml
file as follows:
volumes:
data:
Then, replace the volumes
section in the bot
service with the following:
volumes:
- data:/app/data