Files
Civita/README.md
2025-10-09 09:38:48 +02:00

115 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://stand-with-ukraine.pp.ua)
# Civita
Civita is a multifunctional and lightweight Discord bot built with **TypeScript**.
Its designed to be fast, modular, and easy to maintain — providing essential utilities, moderation tools, and fun features for your Discord community.
---
## ✨ Features
- 🧹 **Moderation** — Kick, ban, mute and manage your server with ease.
- 🎉 **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.
---
## 🧰 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
### Prerequisites
- Node.js v18 or later
- Discord Bot Token ([create one here](https://discord.com/developers/applications))
- PnPm
- Google GenAI Key ([create one here](https://aistudio.google.com/api-keys))
### Setup
```bash
# Clone the repository
git clone https://git.optimihost.com/NaChlorid/civita.git
cd civita
# Install dependencies
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
```
---
## 🧱 Project Structure
```
civita
├── package.json
├── README.md
├── src
│ ├── ai
│ │ └── gemini.ts
│ ├── commands
│ │ ├── leaderboard.ts
│ │ ├── moderation.ts
│ │ ├── profile.ts
│ │ ├── resetmemory.ts
│ │ └── setup.ts
│ ├── config
│ │ └── env.ts
│ ├── db
│ │ ├── migrate.ts
│ │ └── pool.ts
│ ├── deploy-commands.ts
│ ├── events
│ │ ├── guildBanKickLog.ts
│ │ └── messageCreate.ts
│ ├── index.ts
│ ├── scheduler
│ │ └── qotd.ts
│ └── types
│ └── ambient.d.ts
└── tsconfig.json
```
---
## 🧩 Contributing
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.
---
## 🪪 License
This project is licensed under the **MIT License**.
See the [LICENSE](LICENSE) file for details.
---
## 💬 Support
If you encounter issues or have suggestions, please open an issue on https://git.optimihost.com/NaChlorid/Civita/issues
You can also reach out via the Discord server (https://discord.gg/UXrv5d823R).
---