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.
Follow the instructions below to set up your environment, install the necessary dependencies, and prepare for development.
Ensure you have the following installed on your system:
- Python: Version 3.8 or higher
- pip: Python package installer
- git: Version control system
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 a virtual environment helps in managing dependencies and isolating them from your global Python installation.
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:
- Check if Python is installed.
- Create and activate a virtual environment.
- Upgrade
pip
and install all required dependencies.
If you prefer to set up the environment manually, follow the steps below:
-
Create a virtual environment:
python -m venv venv
-
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
-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate
-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate
Once your virtual environment is activated, install the required dependencies:
pip install -r requirements.txt
To deactivate the virtual environment, simply run:
deactivate
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:
- Stash any local changes.
- Pull the latest changes from the remote repository.
- Apply stashed changes.
- Restart the bot.
/hello
: Simply says hello to test the bot.
/chatgpt
: Send a prompt to ChatGPT for a private dismissable response./dalle
: Send a prompt to ChatGPT to generate a DALL·E 3 AI image. The response is a Discord embed, and the image will only be valid for 1 hour. If you fail to download your image in time, all images are hosted at Ravenwood AI Gallery.
/claude
: Send a prompt to Anthropics Claude for a private dismissable response, a conversational bot.
/auth
: A moderator may add a user to the authorized user table for ChatGPT commands./addmod
: A moderator may add a user as a new moderator for the server./backup
: A moderator may backup the chat log.
We welcome contributions to CogniBot! Here are the steps to contribute:
- Join our Discord server: CogniBot Discord
- Fork the repository and create your branch from main.
- Make your changes and ensure the code follows the project's style.
- Test your changes thoroughly.
- Create a pull request with a clear description of your changes.
For any ideas, bugs, or discussion items, please create an issue in the GitHub repository.
- Always ensure you are in the correct directory (
CogniBot
) before creating and activating the virtual environment. - Remember to activate your virtual environment each time you open a new terminal session to run the bot or make changes to it.
- Keep your dependencies up to date by running
pip install -r requirements.txt
after any updates. - Use the provided scripts to simplify updates, backups, and environment setup.