Aethel Bot OSS repository! aethel.xyz
bot fun ai discord discord-bot aethel
at dev 156 lines 4.7 kB view raw view rendered
1# Aethel Monorepo 2 3This monorepo includes both the frontend and backend of the Aethel Discord bot. 4 5[![Node.js](https://img.shields.io/badge/node-%3E=16.9.0-green?logo=node.js)](https://nodejs.org/) 6 7A privacy-conscious, production-ready Discord user-installed bot with AI chat, 8reminders, and utility commands. Built with Node.js, Discord.js v14, PostgreSQL, 9and robust security best practices. 10 11--- 12 13## Features 14 15- **AI Chat**: `/ai` command with custom API key support (OpenRouter, OpenAI, 16 Grok) 17- **Reminders**: `/remind` command for scheduling reminders 18- **Utilities**: `/weather`, `/wiki`, `/joke`, `/cat`, `/dog`, `/8ball`, 19 `/whois` 20- **Ephemeral Replies** for sensitive commands 21- **Encrypted API Key Storage** (AES-256-GCM) 22- **Rate Limiting & Logging** 23- **Express Status Endpoint** for monitoring 24 25--- 26 27## Getting Started 28 29### 1. Clone & Install 30 31```sh 32git clone https://github.com/aethel-labs/aethel.git 33cd bot 34bun i 35``` 36 37### 2. Environment Variables 38 39Copy `.env.example` to `.env` and fill in the required values: 40 41- `DISCORD_TOKEN` (your bot token) 42- `DATABASE_URL` (Postgres connection string) 43- `OPENROUTER_API_KEY` (optional, default AI key) 44- `API_KEY_ENCRYPTION_SECRET` (32+ char secret) 45- `STATUS_API_KEY` (for status endpoint) 46- `ALLOWED_ORIGINS`, `NODE_ENV`, etc. 47- `CLIENT_ID` (your discord bot id, copy it from the dashboard) 48 49### 3. Database Migrations 50 51Run all SQL migrations: 52 53```sh 54bun run scripts/run-migration.js # or node scripts/run-migration.js 55``` 56 57--- 58 59## Usage 60 61- Start the bot: `bun start` 62- Add the bot to your account and use `/ai`, `/remind`, etc. 63- Use `/ai use_custom_api:true` to set your own API key (encrypted) 64 65--- 66 67## Privacy & Security 68 69- **No plaintext API keys stored or logged** 70- **User data is encrypted and can be deleted by user command** 71- **No data sold or shared with third parties** 72- **See https://aethel.xyz/legal/privacy for full policy** 73 74--- 75 76## Contributing 77 78- PRs welcome! Open issues for bugs/feature requests. 79- Follow code style (ESLint, Prettier). 80- Add tests for new features. 81 82--- 83 84## License 85 86This project is licensed under the MIT License. 87 88See [LICENSE](LICENSE) for details. 89 907. Start the bot: 91 ```bash 92 bun start 93 ``` 94 95## Usage 96 97- Use `/ai` for AI chat, with optional custom API key for private usage 98- Use `/remind` to schedule reminders 99- Use utility commands: `/weather`, `/wiki`, `/joke`, `/cat`, `/dog`, `/8ball`, 100 `/whois` 101- Sensitive commands use ephemeral replies for privacy 102- Use `/ai use_custom_api:true` to set your own (encrypted) API key 103 104--- 105 106## Requirements 107 108- Node.js 16.9.0 or higher 109- Discord.js 14.11.0 110 111## 🌐 Translations & Localization 112 113Aethel supports multiple languages! You can help improve or add new translations 114for the bot. 115 116### Supported Languages 117 118- English (en-US) <a href="http://translate.aethel.xyz/engage/aethel/en/"> 119 <img src="http://translate.aethel.xyz/widgets/aethel/en/svg-badge.svg" alt="English translation status" /> 120 </a> 121- Spanish (es-ES) <a href="http://translate.aethel.xyz/engage/aethel/es/"> 122 <img src="http://translate.aethel.xyz/widgets/aethel/es/svg-badge.svg" alt="Spanish translation status" /> 123 </a> 124- Spanish (Latin America) (es-419) 125 <a href="http://translate.aethel.xyz/engage/aethel/es_419/"> 126 <img src="http://translate.aethel.xyz/widgets/aethel/es_419/svg-badge.svg" alt="Spanish (Latin America) translation status" /> 127 </a> 128- German (de-DE) <a href="http://translate.aethel.xyz/engage/aethel/de/"> 129 <img src="http://translate.aethel.xyz/widgets/aethel/de/svg-badge.svg" alt="German translation status" /> 130 </a> 131- French (fr-FR) <a href="http://translate.aethel.xyz/engage/aethel/fr/"> 132 <img src="http://translate.aethel.xyz/widgets/aethel/fr/svg-badge.svg" alt="French translation status" /> 133 </a> 134- Portuguese (Brazil) (pt-BR) 135 <a href="http://translate.aethel.xyz/engage/aethel/pt_BR/"> 136 <img src="http://translate.aethel.xyz/widgets/aethel/pt_BR/svg-badge.svg" alt="Portuguese (Brazil) translation status" /> 137 </a> 138- Japanese (ja) <a href="http://translate.aethel.xyz/engage/aethel/ja/"> 139 <img src="http://translate.aethel.xyz/widgets/aethel/ja/svg-badge.svg" alt="Japanese translation status" /> 140 </a> 141 142### Contribute a Translation 143 144We use [Weblate](https://translate.aethel.xyz/projects/aethel/) for 145collaborative translation. Anyone can contribute: 146 147- Visit the 148 [Aethel Weblate project](https://translate.aethel.xyz/projects/aethel/) 149- Sign in or register (free) 150- Pick your language and start translating or reviewing existing translations 151 152Your help makes Aethel accessible to more people around the world! 153 154<a href="http://translate.aethel.xyz/engage/aethel/"> 155 <img src="http://translate.aethel.xyz/widget/aethel/svg-badge.svg" alt="Translation status" /> 156</a>