Giter Site home page Giter Site logo

charlie's Introduction

Charlie

This is a Python program for a Discord counting bot.

Notice

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.

Features

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/Sprial404/charlie.git
  2. Install the dependencies using pip:

    pip install -r requirements.txt

Usage

  1. Make sure you have Python 3.12 installed.

  2. 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 and your-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".

  3. Run the program using the following command:

    python -m charlie.bot

Deployment with Docker

  1. Install Docker and Docker Compose.

  2. 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
  3. Replace your-discord-bot-token with your actual Discord bot token and your-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".

  4. Run the following command to start the bot using Docker Compose:

    docker-compose up -d
  5. 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.

Using a Named Volume

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.