raythurman2386 / cognibot

Discord bot built with Pycord that offers AI chat and image generation inside of Discord. Image generations are saved in cloudinary and hosted online for all to download.
GNU General Public License v3.0
2 stars 1 forks source link
discord-bot pycord python3

CogniBot

Embark on a journey of intelligent conversations with CogniBot, a Discord companion powered by advanced GPT technology. Crafted with precision using the robust Pycord framework, CogniBot seamlessly integrates into your server, bringing a new level of interactive engagement.

Getting Started

Follow the instructions below to set up your environment, install the necessary dependencies, and prepare for development.

Prerequisites

Ensure you have the following installed on your system:

Cloning the Repository

Clone the repository to your local machine and navigate to the project directory:

git clone https://github.com/raythurman2386/cognibot.git
cd CogniBot

Setting Up the Virtual Environment

Setting up a virtual environment helps in managing dependencies and isolating them from your global Python installation.

Automatic Setup (Recommended)

To simplify the setup process for new developers, use the provided setup.sh script in the scripts directory:

bash scripts/setup.sh

This script will:

  1. Check if Python is installed.
  2. Create and activate a virtual environment.
  3. Upgrade pip and install all required dependencies.

Manual Setup

If you prefer to set up the environment manually, follow the steps below:

Windows (PowerShell)
  1. Create a virtual environment:

    python -m venv venv
  2. Activate the virtual environment:

    .\venv\Scripts\Activate.ps1

    Note: If you encounter a security warning, you might need to change the execution policy temporarily:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
Windows (WSL)
  1. Create a virtual environment:

    python3 -m venv venv
  2. Activate the virtual environment:

    source venv/bin/activate
Linux and Mac
  1. Create a virtual environment:

    python3 -m venv venv
  2. Activate the virtual environment:

    source venv/bin/activate

Installing Dependencies

Once your virtual environment is activated, install the required dependencies:

pip install -r requirements.txt

Deactivating the Virtual Environment

To deactivate the virtual environment, simply run:

deactivate

Updating the Repository and Restarting the Bot

To update the repository with the latest changes and restart the bot, use the provided update.sh script in the /scripts/ directory:

bash scripts/update.sh

This script will:

  1. Stash any local changes.
  2. Pull the latest changes from the remote repository.
  3. Apply stashed changes.
  4. Restart the bot.

Commands

Greetings Commands

OpenAI Commands

Anthropic Commands

Moderator Commands


Contributing

We welcome contributions to CogniBot! Here are the steps to contribute:

For any ideas, bugs, or discussion items, please create an issue in the GitHub repository.


Tips

Additional Resources