Marmot is a modular framework for building QQ group bots based on the OneBot v11 protocol.
It provides scheduling, trigger-based actions, logging, and an extensible plugin system.
- Getting Started
- Directory Structure
- Architecture
- Deployment
- Built With
- Contributing
- Versioning
- Authors
- License
- Acknowledgements
Marmot is written in Go and designed to integrate with OneBot v11 for QQ messaging.
It supports modular extensions, YAML-based configuration, and flexible scheduling.
- Go 1.22 or newer
- SQLite (for
marmot_data.db) - A running OneBot v11-compatible adapter (e.g., go-cqhttp)
-
Clone the repository:
git clone https://github.com/cubevlmu/marmot.git cd marmot -
Install dependencies:
go mod tidy
-
Run the bot:
go run app/main.go
marmot/
├── app/ # Application entrypoint (main.go)
├── bot/ # Bot core logic
│ ├── config.yml # Main configuration
│ ├── scheduler.yml # Task scheduling rules
│ ├── trigger.yml # Event triggers
│ ├── filter.yaml # Message filtering rules
│ ├── marmot_data.db # SQLite database
│ └── logs/ # Runtime logs
├── core/ # Core framework services
├── modules/ # Modular extensions
├── onebot/ # OneBot v11 protocol implementation
│ └── message/ # Message serialization & parsing
├── utils/ # Utility helpers
├── go.mod # Go module definition
├── go.sum # Go dependencies lockfile
└── LICENSE # MIT License
Marmot is built with modularity in mind:
- Core Layer (
core/) – Provides essential services such as configuration, logging, and runtime management. - Modules (
modules/) – Extendable plugins for adding new features without modifying core code. - OneBot Integration (
onebot/) – Handles QQ group messaging via the OneBot v11 protocol. Modified from ZeroBot project. - Bot System (
bot/) – Orchestrates configurations, triggers, schedules, and persistent data.
Marmot can be deployed alongside any OneBot-compatible adapter (e.g., go-cqhttp). A basic deployment looks like this:
-
Start your OneBot adapter (go-cqhttp).
-
Configure
bot/config.ymlwith your connection details. -
Run Marmot with:
go build -o marmot ./app ./marmot
- Go – Core programming language
- OneBot v11 – Messaging protocol for QQ bots
- SQLite – Lightweight database storage
- YAML – Configuration format
Contributions are what make the open source community great! Any contributions you make are greatly appreciated.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project uses Git for version control. Check the repository tags for available versions.
- Cubevlmu – GitHub
- QQ Group Support
See also the list of contributors who participated in this project.
Distributed under the GPLv2 License. See LICENSE for details. Onebot folder is a embedded version of ZeroBot, more information please check the README.md in it.
- HappyTBS for testing the framework