A Discord bot that uses a LLM to provide conversational AI interactions in both DMs, and specific channels in a server. The bot maintains conversation history and allows customization of system prompts, message limits etc..
| Roleplay | Play games |
|---|---|
![]() |
![]() |
- Private conversations in DMs
- Conversation memory with configurable limits
- Customizable AI personality through system prompts
- Rate limiting to prevent abuse (7 messages per minute)
- Automatic conversation expiry after 3600 hours
- Character-based history limiting
- Image handling capabilities
- Simple ! commands for configuration
- Channel message triggers:
- Messages starting with ?
- Messages mentioning "auro"
- Messages ending with .
- Python 3.8 or higher
- A Discord account
- An OpenAI API key or OpenRouter API key
- Go to the Discord Developer Portal
- Click "New Application" and give your bot a name
- Go to the "Bot" section
- Click "Add Bot"
- Under "Privileged Gateway Intents", enable:
- Message Content Intent
- Go to "OAuth2" → "URL Generator"
- Select "bot" under Scopes
- Select these permissions:
- Send Messages
- Add Reactions
- Read Message History
- Copy the generated URL and use it to invite the bot to your server
- Go back to the "Bot" section and copy your bot token (you'll need this later)
- Go to OpenAI's website
- Create an account or log in
- Go to API keys section
- Create a new API key and copy it (you'll need this later)
-
Clone this repository:
git clone https://github.com/aspireone/aura.git cd aura -
Create a virtual environment and activate it:
python -m venv venv # On Windows: venv\Scripts\activate # On Unix or MacOS: source venv/bin/activate
(or use Conda
conda create -n aura python=3.11 && conda activate aura) -
Install required packages:
pip install -r requirements.txt
-
Create a
.envfile in the project root with your tokens:DISCORD_TOKEN=your_discord_bot_token_here OPENAI_API_KEY=your_openai_api_key_here # Optional if using OpenRouter OPENROUTER_API_KEY=your_openrouter_api_key_here # Optional if using OpenAI -
Run the bot:
python -m core.bot
The bot responds in DMs. Start a conversation by sending a direct message to the bot.
!prompt <new_prompt>- Set a new system prompt for the AI's personality!clear-prompt- Reset system prompt to default!clear- Clear your conversation history!info- Show current conversation statistics!setlimit <max_chars>- Set maximum number of characters to keep in history!provider <openai/openrouter>- Set AI provider!model <model name>- Set AI model!help- Show help message
The bot has several configurable parameters in bot.py:
expiry_hours: How long until conversations expire (default: 3600 hours)max_chars: Maximum characters in conversation history (default: 120,000)messages_per_minute: Rate limit for messages (default: 7)
The bot stores all persistent data in the .data directory:
.data/conversations/- Conversation histories (JSON files).data/prompts/- User-specific system prompts.data/providers/- User-specific AI provider settings.data/models/- User-specific AI model settings.data/bot.log- Log files
Each user's data is stored separately using their Discord ID as the filename.
This project is licensed under the MIT License - see the LICENSE file for details.

