README.md aktualisiert
This commit is contained in:
119
README.md
119
README.md
@@ -1,48 +1,95 @@
|
|||||||
## Civita Discord Bot
|
# Civita
|
||||||
|
|
||||||
Modular Discord.js v14 bot with MariaDB storage, Gemini AI, profanity filter, XP system, and slash commands.
|
Civita is a multifunctional and lightweight Discord bot built with **TypeScript**.
|
||||||
|
It’s designed to be fast, modular, and easy to maintain — providing essential utilities, moderation tools, and fun features for your Discord community.
|
||||||
|
|
||||||
### Requirements
|
---
|
||||||
- Node.js 18.17+
|
## ✨ Features
|
||||||
- pnpm 8+
|
- 🧹 **Moderation** — Kick, ban, mute and manage your server with ease.
|
||||||
- MariaDB 10.5+
|
- 🎉 **Fun & Games** — Engage users with AI, QOTD(questions of the day), and other fun commands.
|
||||||
|
- ⚙️ **Customizable** — Easily configurable settings via /setup command.
|
||||||
|
- 🚀 **Lightweight & Fast** — Optimized with TypeScript for performance and maintainability.
|
||||||
|
|
||||||
### Environment
|
---
|
||||||
Create a `.env` file in the project root with:
|
## 🧰 Tech Stack
|
||||||
|
- [TypeScript](https://www.typescriptlang.org/)
|
||||||
|
- [Node.js](https://nodejs.org/)
|
||||||
|
- [Discord.js](https://discord.js.org/)
|
||||||
|
- [Google-GenAI](https://aistudio.google.com/)
|
||||||
|
---
|
||||||
|
|
||||||
```
|
## 📦 Installation
|
||||||
DISCORD_TOKEN=
|
### Prerequisites
|
||||||
DISCORD_CLIENT_ID=
|
- Node.js v18 or later
|
||||||
GEMINI_API_KEY=
|
- Discord Bot Token ([create one here](https://discord.com/developers/applications))
|
||||||
DATABASE_HOST=127.0.0.1
|
- PnPm
|
||||||
DATABASE_PORT=3306
|
- Google GenAI Key ([create one here](https://aistudio.google.com/api-keys))
|
||||||
DATABASE_USER=root
|
### Setup
|
||||||
DATABASE_PASSWORD=changeme
|
```bash
|
||||||
DATABASE_NAME=civita
|
# Clone the repository
|
||||||
```
|
git clone https://git.optimihost.com/NaChlorid/civita.git
|
||||||
|
cd civita
|
||||||
### Install
|
# Install dependencies
|
||||||
```bash
|
|
||||||
pnpm install
|
pnpm install
|
||||||
|
# Configure environment variables
|
||||||
|
cp .env.example .env
|
||||||
|
# Edit .env and add your Discord bot token
|
||||||
|
# Build the project
|
||||||
|
pnpm run build
|
||||||
|
# Start the bot
|
||||||
|
npx dist/index.js
|
||||||
|
```
|
||||||
|
---
|
||||||
|
## ⚙️ Configuration
|
||||||
|
Your `.env` file should look like this:
|
||||||
|
```env
|
||||||
|
DISCORD_TOKEN=(DISCORD TOKEN)
|
||||||
|
GEMINI_API_KEY=(GOOGLE GENAI KEY)
|
||||||
|
DISCORD_CLIENT_ID=(DISCORD APPLICATION ID)
|
||||||
|
DATABASE_HOST=127.0.0.1
|
||||||
|
DATABASE_PORT=3306
|
||||||
|
DATABASE_USER=(DATABASE USER)
|
||||||
|
DATABASE_PASSWORD=(DATABASE PASSWORD)
|
||||||
|
DATABASE_NAME=(DATABASE NAME)
|
||||||
|
```
|
||||||
|
You can also customize command prefixes, logging options, and more depending on your setup.
|
||||||
|
|
||||||
|
---
|
||||||
|
## 🧑💻 Development
|
||||||
|
To start a development environment:
|
||||||
|
```bash
|
||||||
|
pnpm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy Commands
|
---
|
||||||
```bash
|
## 🧱 Project Structure
|
||||||
pnpm deploy
|
```
|
||||||
|
civita/
|
||||||
|
├── src/
|
||||||
|
│ ├── commands/
|
||||||
|
│ ├── events/
|
||||||
|
│ ├── utils/
|
||||||
|
│ └── index.ts
|
||||||
|
├── .env.example
|
||||||
|
├── package.json
|
||||||
|
├── tsconfig.json
|
||||||
|
└── README.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run (dev)
|
---
|
||||||
```bash
|
## 🧩 Contributing
|
||||||
pnpm dev
|
Contributions are welcome!
|
||||||
```
|
Feel free to fork this repository and submit a pull request.
|
||||||
|
Make sure your code follows the existing style and passes all lint checks before submitting.
|
||||||
|
|
||||||
### Features
|
---
|
||||||
- `/setup` to enable/disable: moderation, ai, logs, qotd, profanity_filter
|
## 🪪 License
|
||||||
- `/leaderboard`, `/profile`
|
This project is licensed under the **MIT License**.
|
||||||
- `/ban`, `/kick`, `/timeout`
|
See the [LICENSE](LICENSE) file for details.
|
||||||
- Profanity filter (toggle via `/setup`)
|
|
||||||
- Bot answers when mentioned if AI enabled
|
|
||||||
- Daily QOTD if enabled and channel set
|
|
||||||
- Status updates to: watching (N) servers
|
|
||||||
|
|
||||||
|
---
|
||||||
|
## 💬 Support
|
||||||
|
If you encounter issues or have suggestions, please open an issue on GitHub.
|
||||||
|
You can also reach out via the Discord server (if available).
|
||||||
|
---
|
||||||
|
|
||||||
Reference in New Issue
Block a user