Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,13 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/

# PerlicaBot specific
log/*.log
log/*.txt
config/config.yaml
!config/config.yaml.example
plugins/*/cache/
plugins/*/temp/
*.db

134 changes: 133 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,134 @@
<div align="center">

# PerlicaBot
新建文件夹!

**AmiyaBot 的终末地版本**

基于 [AmiyaBot](https://www.amiyabot.com/) 框架的终末地聊天机器人<br>
专为《明日方舟:终末地》(Arknights: Endfield) 玩家打造

</div>

<div>
<img alt="license" src="https://img.shields.io/badge/license-MIT-green">
<img alt="Python" src="https://img.shields.io/badge/Python-3.10+-blue?logo=python&logoColor=white">
<img alt="platform" src="https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-blueviolet">
</div>

## 📖 项目简介

PerlicaBot 是基于 AmiyaBot 框架开发的聊天机器人,专门为《明日方舟:终末地》(Arknights: Endfield)游戏设计。项目名称源于游戏中的角色"佩莉卡"(Perlica),旨在为终末地玩家提供便捷的游戏辅助功能和互动体验。

## ✨ 主要特性

- 🤖 基于成熟的 AmiyaBot 框架
- 🎮 专为终末地游戏设计的功能
- 🔌 支持插件扩展
- 📊 完整的日志记录系统
- 🛠️ 易于配置和部署

## 🚀 快速开始

详细部署指南请参阅 [部署文档](docs/DEPLOYMENT.md)。

### 环境要求

- Python 3.10 或更高版本
- pip 包管理器

### 安装步骤

1. 克隆仓库

```bash
git clone https://github.com/AmiyaBot/PerlicaBot.git
cd PerlicaBot
```

2. 安装依赖

```bash
pip install -r requirements.txt
```

3. 配置机器人

编辑 `config/config.yaml` 文件,填入你的机器人配置信息:

```yaml
bot:
appid: "你的机器人AppID"
token: "你的机器人Token"
```

4. 启动机器人

```bash
python perlica.py
```

## 📝 使用指南

### 基础命令

- `帮助` / `help` - 显示帮助信息
- `关于` - 查看机器人信息
- `佩莉卡` - 触发佩莉卡问候

### 配置说明

配置文件位于 `config/config.yaml`,主要配置项包括:

- **bot**: 机器人基础配置(AppID、Token等)
- **admin**: 管理员账号列表
- **plugins**: 插件相关配置
- **log**: 日志配置

## 🔧 开发指南

### 项目结构

```
PerlicaBot/
├── config/ # 配置文件目录
│ └── config.yaml # 主配置文件
├── plugins/ # 插件目录
├── log/ # 日志目录
├── perlica.py # 主程序入口
├── requirements.txt # 依赖列表
└── README.md # 项目说明
```

### 开发插件

PerlicaBot 支持通过插件扩展功能。插件开发请参考 [AmiyaBot 插件开发文档](https://www.amiyabot.com/develop/plugin/)。

## 🤝 贡献

欢迎为 PerlicaBot 做出贡献!你可以:

- 提交 Bug 报告或功能建议到 [Issues](../../issues)
- 开发新的插件功能
- 完善文档和示例
- 分享使用经验

## 📄 许可证

本项目采用 MIT 许可证。详见 [LICENSE](LICENSE) 文件。

## 🙏 鸣谢

- [AmiyaBot](https://github.com/AmiyaBot/Amiya-Bot) - 核心框架
- [AmiyaBot-core](https://github.com/AmiyaBot/Amiya-Bot-core) - 框架核心
- 《明日方舟:终末地》官方 - 游戏内容

## 📮 联系方式

- 项目地址:https://github.com/AmiyaBot/PerlicaBot
- AmiyaBot 官网:https://www.amiyabot.com/

---

<div align="center">
「准备好了吗?让我们一起探索终末地的世界!」 —— 佩莉卡
</div>
23 changes: 23 additions & 0 deletions config/config.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# PerlicaBot 配置文件示例
# 复制此文件为 config.yaml 并填入你的配置信息

# 机器人基础配置
bot:
appid: "" # QQ机器人的AppID
token: "" # QQ机器人的Token
app_name: "PerlicaBot"
log_name: "PerlicaBot"

# 管理员配置
admin:
accounts: [] # 管理员账号列表,例如:["123456789", "987654321"]

# 插件配置
plugins:
enabled: true
path: "plugins"

# 日志配置
log:
level: "INFO" # 日志级别:DEBUG, INFO, WARNING, ERROR
save_path: "log"
80 changes: 80 additions & 0 deletions docs/DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# PerlicaBot 部署指南

本文档将指导您完成 PerlicaBot 的部署过程。

## 系统要求

### 最低要求
- Python 3.10 或更高版本
- 2GB RAM
- 1GB 可用磁盘空间
- 稳定的网络连接

### 推荐配置
- Python 3.11+
- 4GB+ RAM
- 5GB+ 可用磁盘空间

## 安装步骤

### 1. 安装 Python

确保系统已安装 Python 3.10+:

```bash
python --version
# 或
python3 --version
```

如果未安装,请访问 [Python官网](https://www.python.org/) 下载安装。

### 2. 克隆项目

```bash
git clone https://github.com/AmiyaBot/PerlicaBot.git
cd PerlicaBot
```

### 3. 安装依赖

建议使用虚拟环境:

```bash
# 创建虚拟环境
python -m venv venv

# 激活虚拟环境
# Windows:
venv\Scripts\activate
# Linux/macOS:
source venv/bin/activate

# 安装依赖
pip install -r requirements.txt
```

### 4. 配置机器人

复制配置示例文件:

```bash
cp config/config.yaml.example config/config.yaml
```

编辑 `config/config.yaml`,填入您的机器人配置。

### 5. 启动机器人

```bash
python perlica.py
```

## 常见问题

详见完整文档。

## 获取帮助

- 项目 Issues: https://github.com/AmiyaBot/PerlicaBot/issues
- AmiyaBot 官方文档: https://www.amiyabot.com/
101 changes: 101 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# PerlicaBot 项目总结

## 项目概述

PerlicaBot 是基于 AmiyaBot 框架开发的终末地(Arknights: Endfield)版本聊天机器人。

## 已实现功能

### 核心功能
- ✅ 基础机器人框架集成
- ✅ 配置文件加载系统
- ✅ 插件系统支持
- ✅ 日志记录功能

### 基础命令
- ✅ 帮助命令 - 显示可用命令列表
- ✅ 关于命令 - 显示机器人信息
- ✅ 佩莉卡问候 - 角色互动

### 终末地插件 (endfield_basic)
- ✅ 终末地游戏信息查询
- ✅ 佩莉卡角色详情
- ✅ 角色列表展示
- ✅ 游戏开发进度查询

## 项目结构

```
PerlicaBot/
├── config/ # 配置文件目录
│ ├── config.yaml.example
│ └── config.yaml # 用户配置(.gitignore)
├── docs/ # 文档目录
│ ├── DEPLOYMENT.md # 部署指南
│ └── SUMMARY.md # 项目总结
├── log/ # 日志目录
│ └── README.md
├── plugins/ # 插件目录
│ ├── endfield_basic/ # 终末地基础插件
│ └── README.md
├── perlica.py # 主程序入口
├── requirements.txt # Python依赖
├── README.md # 项目说明
└── LICENSE # MIT许可证
```

## 技术栈

- **框架**: AmiyaBot 6.0+
- **语言**: Python 3.10+
- **依赖**:
- amiyabot>=6.0.0
- amiyabot-arknights-gamedata>=3.0.0
- pyyaml>=6.0

## 安全性

- ✅ 通过 CodeQL 安全扫描
- ✅ 通过依赖漏洞检查
- ✅ 配置凭据从文件或环境变量加载
- ✅ 无硬编码敏感信息

## 代码质量

- ✅ 通过代码审查
- ✅ Python 语法检查通过
- ✅ 遵循最佳实践
- ✅ 完整的文档注释

## 后续开发建议

### 功能扩展
1. 添加更多终末地角色信息
2. 实现游戏数据查询功能
3. 添加公告推送功能
4. 开发签到/抽卡模拟功能

### 技术优化
1. 添加单元测试
2. 实现 Docker 部署
3. 添加 CI/CD 流程
4. 性能监控和优化

### 文档完善
1. 添加插件开发教程
2. 补充更多使用示例
3. 添加常见问题解答
4. 制作视频教程

## 贡献者

- 项目基于 AmiyaBot 框架
- 感谢 AmiyaBot 社区的支持

## 许可证

MIT License

---

最后更新:2026-01-22
5 changes: 5 additions & 0 deletions log/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# PerlicaBot 日志目录

此目录用于存储 PerlicaBot 的运行日志。

日志文件会按日期自动分割,便于查看和管理。
Loading