Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21bdb011e0 | ||
|
|
47f3518b04 | ||
|
|
997ce52d69 | ||
|
|
4bc433f049 | ||
|
|
4d6013ca02 | ||
|
|
f09f2c3162 | ||
|
|
67fdbb824b | ||
|
|
b4ccbb0f80 | ||
|
|
6326d888c8 | ||
|
|
e32f3dd22a | ||
|
|
c7e073baea | ||
|
|
1be99ac64d |
@@ -8,23 +8,14 @@ NICKNAME=["真寻", "小真寻", "绪山真寻", "小寻子"]
|
|||||||
|
|
||||||
SESSION_EXPIRE_TIMEOUT=30
|
SESSION_EXPIRE_TIMEOUT=30
|
||||||
|
|
||||||
ALCONNA_USE_COMMAND_START=True
|
|
||||||
|
|
||||||
# 全局图片统一使用bytes发送,当真寻与协议端不在同一服务器上时为True
|
# 全局图片统一使用bytes发送,当真寻与协议端不在同一服务器上时为True
|
||||||
IMAGE_TO_BYTES = True
|
IMAGE_TO_BYTES = False
|
||||||
|
|
||||||
# 回复消息时自称
|
# 回复消息时自称
|
||||||
SELF_NICKNAME="小真寻"
|
SELF_NICKNAME="小真寻"
|
||||||
|
|
||||||
# 官bot appid:bot账号
|
|
||||||
QBOT_ID_DATA = '{
|
|
||||||
|
|
||||||
}'
|
|
||||||
|
|
||||||
# 数据库配置
|
# 数据库配置
|
||||||
# 示例: "postgres://user:password@127.0.0.1:5432/database"
|
# 示例: "postgres://user:password@127.0.0.1:5432/database"
|
||||||
# 示例: "mysql://user:password@127.0.0.1:3306/database"
|
|
||||||
# 示例: "sqlite:data/db/zhenxun.db" 在data目录下建立db文件夹
|
|
||||||
DB_URL = ""
|
DB_URL = ""
|
||||||
|
|
||||||
# 系统代理
|
# 系统代理
|
||||||
|
|||||||
@@ -1,77 +0,0 @@
|
|||||||
template: $CHANGES
|
|
||||||
name-template: "v$RESOLVED_VERSION"
|
|
||||||
tag-template: "v$RESOLVED_VERSION"
|
|
||||||
exclude-labels:
|
|
||||||
- reverted
|
|
||||||
- no-changelog
|
|
||||||
- skip-changelog
|
|
||||||
- invalid
|
|
||||||
autolabeler:
|
|
||||||
- label: "bug"
|
|
||||||
title:
|
|
||||||
- "/:bug:.+/"
|
|
||||||
- "/🐛.+/"
|
|
||||||
- label: "enhancement"
|
|
||||||
title:
|
|
||||||
- "/:sparkles:.+/"
|
|
||||||
- "/✨.+/"
|
|
||||||
- label: "ci"
|
|
||||||
files:
|
|
||||||
- .github/**/*
|
|
||||||
- label: "breaking-change"
|
|
||||||
title:
|
|
||||||
- "/.+!:.+/"
|
|
||||||
- label: "documentation"
|
|
||||||
files:
|
|
||||||
- "*.md"
|
|
||||||
- label: "dependencies"
|
|
||||||
files:
|
|
||||||
- "pyproject.toml"
|
|
||||||
- "requirements.txt"
|
|
||||||
- "poetry.lock"
|
|
||||||
title:
|
|
||||||
- "/:wrench:.+/"
|
|
||||||
- "/🔧.+/"
|
|
||||||
- label: "resources"
|
|
||||||
files:
|
|
||||||
- resources/**/*
|
|
||||||
categories:
|
|
||||||
- title: 💥 破坏性变更
|
|
||||||
labels:
|
|
||||||
- breaking-change
|
|
||||||
- title: 🚀 新功能
|
|
||||||
labels:
|
|
||||||
- enhancement
|
|
||||||
- title: 🐛 Bug 修复
|
|
||||||
labels:
|
|
||||||
- bug
|
|
||||||
- title: 📝 文档更新
|
|
||||||
labels:
|
|
||||||
- documentation
|
|
||||||
- title: 👻 自动化程序
|
|
||||||
labels:
|
|
||||||
- chore
|
|
||||||
- internal
|
|
||||||
- maintenance
|
|
||||||
- title: 🚦 测试
|
|
||||||
labels:
|
|
||||||
- test
|
|
||||||
- tests
|
|
||||||
- title: 📦 依赖更新
|
|
||||||
labels:
|
|
||||||
- dependencies
|
|
||||||
collapse-after: 15
|
|
||||||
- title: 💫 杂项
|
|
||||||
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
|
|
||||||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
|
||||||
version-resolver:
|
|
||||||
major:
|
|
||||||
labels:
|
|
||||||
- "major"
|
|
||||||
minor:
|
|
||||||
labels:
|
|
||||||
- "minor"
|
|
||||||
patch:
|
|
||||||
labels:
|
|
||||||
- "patch"
|
|
||||||
default: patch
|
|
||||||
@@ -3,16 +3,8 @@ name: 检查bot是否运行正常
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["dev", "main"]
|
branches: ["dev", "main"]
|
||||||
paths:
|
|
||||||
- zhenxun/**
|
|
||||||
- tests/**
|
|
||||||
- bot.py
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["dev", "main"]
|
branches: ["dev", "main"]
|
||||||
paths:
|
|
||||||
- zhenxun/**
|
|
||||||
- tests/**
|
|
||||||
- bot.py
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bot-check:
|
bot-check:
|
||||||
@@ -36,14 +28,7 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pypoetry
|
path: ~/.cache/pypoetry
|
||||||
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
|
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}
|
||||||
|
|
||||||
- name: Cache playwright cache
|
|
||||||
id: cache-playwright
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.cache/ms-playwright
|
|
||||||
key: playwright-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}
|
|
||||||
|
|
||||||
- name: Cache Data cache
|
- name: Cache Data cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@@ -57,9 +42,7 @@ jobs:
|
|||||||
rm -rf poetry.lock
|
rm -rf poetry.lock
|
||||||
poetry source remove ali
|
poetry source remove ali
|
||||||
poetry install --no-root
|
poetry install --no-root
|
||||||
|
poetry run pip install pydantic==1.10
|
||||||
- name: Run tests
|
|
||||||
run: poetry run pytest --cov=zhenxun --cov-report xml
|
|
||||||
|
|
||||||
- name: Check bot run
|
- name: Check bot run
|
||||||
id: bot_check_run
|
id: bot_check_run
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
name: Release Drafter
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- dev
|
|
||||||
pull_request:
|
|
||||||
types: [opened, reopened, synchronize]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update_release_draft:
|
|
||||||
name: Update Release Draft
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: release-drafter/release-drafter@v6
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
name: Update Version
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- .github/workflows/update_version_pr.yml
|
|
||||||
- zhenxun/**
|
|
||||||
- resources/**
|
|
||||||
- bot.py
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
|
||||||
|
|
||||||
- name: Read current version
|
|
||||||
id: read_version
|
|
||||||
run: |
|
|
||||||
version_line=$(grep '__version__' __version__)
|
|
||||||
version=$(echo $version_line | sed -E 's/__version__:\s*v([0-9]+\.[0-9]+\.[0-9]+)(-.+)?/\1/')
|
|
||||||
echo "Current version: $version"
|
|
||||||
echo "current_version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Check for version file changes
|
|
||||||
id: check_diff
|
|
||||||
run: |
|
|
||||||
if git diff --name-only HEAD~1 HEAD | grep -q '__version__'; then
|
|
||||||
echo "Version file has changes"
|
|
||||||
echo "version_changed=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "Version file has no changes"
|
|
||||||
echo "version_changed=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Get commit hash
|
|
||||||
id: get_commit_hash
|
|
||||||
run: echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Update version file
|
|
||||||
id: update_version
|
|
||||||
if: steps.check_diff.outputs.version_changed == 'false'
|
|
||||||
run: |
|
|
||||||
current_version="${{ steps.read_version.outputs.current_version }}"
|
|
||||||
commit_hash="${{ steps.get_commit_hash.outputs.commit_hash }}"
|
|
||||||
new_version="v${current_version}-${commit_hash}"
|
|
||||||
echo "new_version=$new_version" >> $GITHUB_OUTPUT
|
|
||||||
echo "Updating version to: $new_version"
|
|
||||||
echo "__version__: $new_version" > __version__
|
|
||||||
|
|
||||||
- name: Check updated version
|
|
||||||
if: steps.check_diff.outputs.version_changed == 'false'
|
|
||||||
run: cat __version__
|
|
||||||
|
|
||||||
- name: Create or update PR
|
|
||||||
if: steps.check_diff.outputs.version_changed == 'false'
|
|
||||||
uses: peter-evans/create-pull-request@v7
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
|
||||||
branch: create-pr/update_version
|
|
||||||
title: ":tada: chore(version): 自动更新版本到 ${{ steps.update_version.outputs.new_version }}"
|
|
||||||
body: "This PR updates the version file."
|
|
||||||
commit-message: ":tada: chore(version): Update version to ${{ steps.update_version.outputs.new_version }}"
|
|
||||||
add-paths: __version__
|
|
||||||
author: "AkashiCoin <i@loli.vet>"
|
|
||||||
committer: "${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>"
|
|
||||||
labels: automated-update
|
|
||||||
@@ -174,9 +174,11 @@ data/
|
|||||||
/resources/image/prts/
|
/resources/image/prts/
|
||||||
/configs/config.py
|
/configs/config.py
|
||||||
configs/config.yaml
|
configs/config.yaml
|
||||||
|
./.env
|
||||||
|
./.env.dev
|
||||||
plugins/csgo_server/
|
plugins/csgo_server/
|
||||||
plugins/activity/
|
plugins/activity/
|
||||||
!/resources/image/genshin/alc/back.png
|
!/resources/image/genshin/alc/back.png
|
||||||
!/data/genshin_alc/
|
!/data/genshin_alc/
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
plugins_/
|
/resources/template/my_info
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"charliermarsh.ruff",
|
|
||||||
"esbenp.prettier-vscode",
|
|
||||||
"ms-python.black-formatter",
|
|
||||||
"ms-python.isort",
|
|
||||||
"ms-python.python",
|
|
||||||
"ms-python.vscode-pylance"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -13,13 +13,11 @@
|
|||||||
"getbbox",
|
"getbbox",
|
||||||
"hibiapi",
|
"hibiapi",
|
||||||
"httpx",
|
"httpx",
|
||||||
"jsdelivr",
|
|
||||||
"kaiheila",
|
"kaiheila",
|
||||||
"lolicon",
|
"lolicon",
|
||||||
"nonebot",
|
"nonebot",
|
||||||
"onebot",
|
"onebot",
|
||||||
"pixiv",
|
"pixiv",
|
||||||
"qbot",
|
|
||||||
"Setu",
|
"Setu",
|
||||||
"tobytes",
|
"tobytes",
|
||||||
"ujson",
|
"ujson",
|
||||||
@@ -27,34 +25,5 @@
|
|||||||
"userinfo",
|
"userinfo",
|
||||||
"zhenxun"
|
"zhenxun"
|
||||||
],
|
],
|
||||||
"python.analysis.autoImportCompletions": true,
|
"python.analysis.autoImportCompletions": true
|
||||||
"python.testing.pytestArgs": ["tests"],
|
|
||||||
"python.testing.unittestEnabled": false,
|
|
||||||
"python.testing.pytestEnabled": true,
|
|
||||||
"[python]": {
|
|
||||||
"editor.defaultFormatter": "charliermarsh.ruff", // 默认使用 Ruff 格式化
|
|
||||||
"editor.wordBasedSuggestions": "allDocuments",
|
|
||||||
"editor.formatOnType": true,
|
|
||||||
"editor.formatOnSave": true, // 保存时自动格式化
|
|
||||||
"editor.codeActionsOnSave": {
|
|
||||||
"source.fixAll.ruff": "explicit",
|
|
||||||
"source.organizeImports": "explicit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ruff.format.preview": false,
|
|
||||||
"isort.check": true,
|
|
||||||
"ruff.importStrategy": "useBundled",
|
|
||||||
"ruff.organizeImports": false,
|
|
||||||
"[javascript]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[json]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[yaml]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[markdown]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,6 @@ WORKDIR /app/zhenxun
|
|||||||
|
|
||||||
COPY . /app/zhenxun
|
COPY . /app/zhenxun
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt upgrade -y && \
|
|
||||||
apt install -y --no-install-recommends \
|
|
||||||
gcc \
|
|
||||||
g++ && \
|
|
||||||
apt clean
|
|
||||||
|
|
||||||
RUN pip install poetry -i https://mirrors.aliyun.com/pypi/simple/
|
RUN pip install poetry -i https://mirrors.aliyun.com/pypi/simple/
|
||||||
|
|
||||||
RUN poetry install
|
RUN poetry install
|
||||||
@@ -21,8 +14,6 @@ VOLUME /app/zhenxun/data /app/zhenxun/data
|
|||||||
|
|
||||||
VOLUME /app/zhenxun/resources /app/zhenxun/resources
|
VOLUME /app/zhenxun/resources /app/zhenxun/resources
|
||||||
|
|
||||||
VOLUME /app/zhenxun/.env.dev /app/zhenxun/.env.dev
|
|
||||||
|
|
||||||
RUN poetry run playwright install --with-deps chromium
|
RUN poetry run playwright install --with-deps chromium
|
||||||
|
|
||||||
CMD ["poetry", "run", "python", "bot.py"]
|
CMD ["poetry", "run", "python", "bot.py"]
|
||||||
@@ -39,12 +39,11 @@
|
|||||||
:tada:喜欢真寻,于是真寻就来了!:tada:
|
:tada:喜欢真寻,于是真寻就来了!:tada:
|
||||||
|
|
||||||
本项目符合 [OneBot](https://github.com/howmanybots/onebot) 标准,可基于以下项目与机器人框架/平台进行交互
|
本项目符合 [OneBot](https://github.com/howmanybots/onebot) 标准,可基于以下项目与机器人框架/平台进行交互
|
||||||
|
|
||||||
| 项目地址 | 平台 | 核心作者 | 备注 |
|
| 项目地址 | 平台 | 核心作者 | 备注 |
|
||||||
| :-----------------------------------------------------------: | :--: | :----------------------: | :--: |
|
| :---: | :---: | :---: | :---: |
|
||||||
| [LLOneBot](https://github.com/LLOneBot/LLOneBot) | NTQQ | linyuchen | 可用 |
|
| [LLOneBot](https://github.com/LLOneBot/LLOneBot) | NTQQ | linyuchen | 可用 |
|
||||||
| [Napcat](https://github.com/NapNeko/NapCatQQ) | NTQQ | NapNeko | 可用 |
|
| [Napcat](https://github.com/NapNeko/NapCatQQ) | NTQQ | NapNeko | 可用 |
|
||||||
| [Lagrange.Core](https://github.com/LagrangeDev/Lagrange.Core) | NTQQ | LagrangeDev/Linwenxuan04 | 可用 |
|
| [Lagrange.Core](https://github.com/LagrangeDev/Lagrange.Core) | | LagrangeDev/Linwenxuan04 | 可用
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -58,9 +57,8 @@
|
|||||||
|
|
||||||
<div align=center>
|
<div align=center>
|
||||||
|
|
||||||
<img width="350" height="350" src="https://raw.githubusercontent.com/HibiKier/zhenxun_bot/main/docs_image/help.png"/>
|
<img width="400" height="400" src="https://raw.githubusercontent.com/HibiKier/zhenxun_bot/main/docs_image/help.png"/>
|
||||||
<img width="250" height="500" src="https://raw.githubusercontent.com/HibiKier/zhenxun_bot/main/docs_image/html_help.png"/>
|
<img width="250" height="500" src="https://raw.githubusercontent.com/HibiKier/zhenxun_bot/main/docs_image/html_help.png"/>
|
||||||
<img width="180" height="450" src="https://github.com/HibiKier/zhenxun_bot/blob/dev/docs_image/zhenxun_help.png"/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -68,7 +66,7 @@
|
|||||||
|
|
||||||
### 1. 体验一下?
|
### 1. 体验一下?
|
||||||
|
|
||||||
这是一个免费的,版本为 dev 的 zhenxun,你可以通过 [napcat](https://github.com/NapNeko/NapCatQQ) 或 [拉格朗日](https://github.com/LagrangeDev/Lagrange.Core) 以及 [matcha](https://github.com/A-kirami/matcha) 等直接连接用于体验与测试
|
这是一个免费的,版本为dev的zhenxun,你可以通过napcat或拉格朗日等直接连接用于体验与测试
|
||||||
(球球了测试君!)
|
(球球了测试君!)
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -85,24 +83,26 @@ AccessToken: PUBLIC_ZHENXUN_TEST
|
|||||||
“不要害怕,你的背后还有千千万万的 <strong>伙伴</strong> 啊!”
|
“不要害怕,你的背后还有千千万万的 <strong>伙伴</strong> 啊!”
|
||||||
|
|
||||||
| 项目名称 | 主要用途 | 仓库作者 | 备注 |
|
| 项目名称 | 主要用途 | 仓库作者 | 备注 |
|
||||||
| :--------------------------------------------------------------------: | :------: | :-------------------------------------------------: | :---------------------------: |
|
| :-----------------------------------------------------------------------------------------------: | :------: | :-------------------------------------------: | :-------------------------------------------------------------: |
|
||||||
| [插件库](https://github.com/zhenxun-org/zhenxun_bot_plugins) | 插件 | [zhenxun-org](https://github.com/zhenxun-org) | 原plugins文件夹插件 |
|
| [插件库](https://github.com/zhenxun-org/zhenxun_bot_plugins) | 插件 | [zhenxun-org](https://github.com/zhenxun-org) | 原plugins文件夹插件 |
|
||||||
| [插件索引库](https://github.com/zhenxun-org/zhenxun_bot_plugins_index) | 插件 | [zhenxun-org](https://github.com/zhenxun-org) | 扩展插件索引库 |
|
| [插件索引库](https://github.com/zhenxun-org/zhenxun_bot_plugins_index) | 插件 | [zhenxun-org](https://github.com/zhenxun-org) | 扩展插件索引库 |
|
||||||
| [一键安装](https://github.com/soloxiaoye2022/zhenxun_bot-deploy) | 安装 | [soloxiaoye2022](https://github.com/soloxiaoye2022) | 第三方 |
|
|
||||||
| [WebUi](https://github.com/HibiKier/zhenxun_bot_webui) | 管理 | [hibikier](https://github.com/HibiKier) | 基于真寻WebApi的webui实现 |
|
| [WebUi](https://github.com/HibiKier/zhenxun_bot_webui) | 管理 | [hibikier](https://github.com/HibiKier) | 基于真寻WebApi的webui实现 |
|
||||||
| [安卓 app(WebUi)](https://github.com/YuS1aN/zhenxun_bot_android_ui) | 安装 | [YuS1aN](https://github.com/YuS1aN) | 第三方 |
|
| [一键安装](https://github.com/zhenxun-org/zhenxun_bot-deploy) | 安装 | [AkashiCoin](https://github.com/AkashiCoin) | 新版本未测试 |
|
||||||
|
| [Docker单机版](https://github.com/Sakuracio/zhenxun_bot_docker) | 安装 | [zhenxun-org](https://github.com/zhenxun-org) | 新版本未测试 |
|
||||||
|
| [Docker全量版](https://shields.io/badge/GITHUB-SinKy--Yan-4476AF?logo=github&style=for-the-badge) | 安装 | [zhenxun-org](https://github.com/zhenxun-org) | 包含 真寻Bot PostgreSQL数据库 go-cqhttp webui等(新版本未测试) |
|
||||||
|
|
||||||
|
PS: **ARM平台** 请使用全量版 同时 **如果你的机器 RAM < 1G 可能无法正常启动全量版容器**
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> <strong> WebUI </strong>后台示例图 </summary>
|
<summary> <strong> WebUI </strong>后台示例图 </summary>
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ AccessToken: PUBLIC_ZHENXUN_TEST
|
|||||||
- 通过Config配置项将所有插件配置统计保存至config.yaml,利于统一用户修改
|
- 通过Config配置项将所有插件配置统计保存至config.yaml,利于统一用户修改
|
||||||
- 方便增删插件,原生nonebot2 matcher,不需要额外修改,仅仅通过简单的配置属性就可以生成`帮助图片`和`帮助信息`
|
- 方便增删插件,原生nonebot2 matcher,不需要额外修改,仅仅通过简单的配置属性就可以生成`帮助图片`和`帮助信息`
|
||||||
- 提供了cd,阻塞,每日次数等限制,仅仅通过简单的属性就可以生成一个限制,例如:`PluginCdBlock` 等
|
- 提供了cd,阻塞,每日次数等限制,仅仅通过简单的属性就可以生成一个限制,例如:`PluginCdBlock` 等
|
||||||
- **..... 更多详细请通过[[传送门](https://hibikier.github.io/zhenxun_bot/)]查看文档!**
|
- **..... 更多详细请通过`传送门`查看文档!**
|
||||||
|
|
||||||
## 简单部署
|
## 简单部署
|
||||||
|
|
||||||
@@ -135,6 +135,9 @@ poetry install # 安装依赖
|
|||||||
poetry shell # 进入虚拟环境
|
poetry shell # 进入虚拟环境
|
||||||
python bot.py
|
python bot.py
|
||||||
|
|
||||||
|
# 在Linux系统,你可能还需要运行此命令安装playwright依赖
|
||||||
|
playwright install-deps
|
||||||
|
|
||||||
# 首次后会在data目录下生成config.yaml文件
|
# 首次后会在data目录下生成config.yaml文件
|
||||||
# config.yaml用户配置插件
|
# config.yaml用户配置插件
|
||||||
```
|
```
|
||||||
@@ -156,8 +159,6 @@ python bot.py
|
|||||||
'
|
'
|
||||||
# 此处填写你的数据库地址
|
# 此处填写你的数据库地址
|
||||||
# 示例: "postgres://user:password@127.0.0.1:5432/database"
|
# 示例: "postgres://user:password@127.0.0.1:5432/database"
|
||||||
# 示例: "mysql://user:password@127.0.0.1:5432/database"
|
|
||||||
# 示例: "sqlite:data/db/zhenxun.db" 在data目录下建立db文件夹
|
|
||||||
DB_URL = "" # 数据库地址
|
DB_URL = "" # 数据库地址
|
||||||
|
|
||||||
|
|
||||||
@@ -166,7 +167,7 @@ python bot.py
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- ## 功能列表 (旧版列表)
|
## 功能列表 (旧版列表)
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>已实现的功能</summary>
|
<summary>已实现的功能</summary>
|
||||||
@@ -314,13 +315,13 @@ python bot.py
|
|||||||
- [x] 定时更新权限
|
- [x] 定时更新权限
|
||||||
- [x] 自动配置重载
|
- [x] 自动配置重载
|
||||||
|
|
||||||
</details> -->
|
</details>
|
||||||
|
|
||||||
## [爱发电](https://afdian.net/@HibiKier)
|
## [爱发电](https://afdian.net/@HibiKier)
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>爱发电 以及 感谢投喂 </summary>
|
<summary>爱发电 以及 感谢投喂 </summary>
|
||||||
<img width="365px" height="450px" src="https://raw.githubusercontent.com/HibiKier/zhenxun_bot/main/docs_image/afd.jpg">
|
<img width="365px" height="450px" src="https://user-images.githubusercontent.com/45528451/175059389-cfeb8174-fa07-4939-80ab-a039087a50f6.png">
|
||||||
|
|
||||||
### 感谢名单
|
### 感谢名单
|
||||||
|
|
||||||
@@ -370,15 +371,14 @@ python bot.py
|
|||||||
[哇](https://afdian.net/u/9b266244f23911eca19052540025c377)
|
[哇](https://afdian.net/u/9b266244f23911eca19052540025c377)
|
||||||
[yajiwa](https://github.com/yajiwa)
|
[yajiwa](https://github.com/yajiwa)
|
||||||
[爆金币](https://afdian.net/u/0d78879ef23711ecb22452540025c377)
|
[爆金币](https://afdian.net/u/0d78879ef23711ecb22452540025c377)
|
||||||
...
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<!-- ## 更新
|
## 更新
|
||||||
|
|
||||||
### 2024/8/11
|
### 2024/8/11
|
||||||
|
|
||||||
- 更新 dev -->
|
- 更新dev
|
||||||
|
|
||||||
<!-- ### 2024/1/25
|
<!-- ### 2024/1/25
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__: v0.2.4-fix2
|
__version__: v0.2.2
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from nonebot.adapters.onebot.v11 import Adapter as OneBotV11Adapter
|
|||||||
|
|
||||||
nonebot.init()
|
nonebot.init()
|
||||||
|
|
||||||
|
from zhenxun.services.db_context import disconnect, init
|
||||||
|
|
||||||
driver = nonebot.get_driver()
|
driver = nonebot.get_driver()
|
||||||
driver.register_adapter(OneBotV11Adapter)
|
driver.register_adapter(OneBotV11Adapter)
|
||||||
@@ -14,7 +15,6 @@ driver.register_adapter(KaiheilaAdapter)
|
|||||||
driver.register_adapter(DoDoAdapter)
|
driver.register_adapter(DoDoAdapter)
|
||||||
# driver.register_adapter(DiscordAdapter)
|
# driver.register_adapter(DiscordAdapter)
|
||||||
|
|
||||||
from zhenxun.services.db_context import init, disconnect
|
|
||||||
|
|
||||||
driver.on_startup(init)
|
driver.on_startup(init)
|
||||||
driver.on_shutdown(disconnect)
|
driver.on_shutdown(disconnect)
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 315 KiB |
|
Before Width: | Height: | Size: 352 KiB |
|
Before Width: | Height: | Size: 279 KiB |
|
Before Width: | Height: | Size: 182 KiB |
|
Before Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 201 KiB |
|
Before Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 230 KiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 189 KiB |
|
After Width: | Height: | Size: 171 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 917 KiB |
@@ -25,7 +25,6 @@ ujson = "^5.9.0"
|
|||||||
nonebot-adapter-kaiheila = "^0.3.0"
|
nonebot-adapter-kaiheila = "^0.3.0"
|
||||||
nb-cli = "^1.3.0"
|
nb-cli = "^1.3.0"
|
||||||
nonebot2 = "^2.1.3"
|
nonebot2 = "^2.1.3"
|
||||||
pydantic = "1.10.18"
|
|
||||||
nonebot-adapter-discord = "^0.1.3"
|
nonebot-adapter-discord = "^0.1.3"
|
||||||
nonebot-adapter-dodo = "^0.1.4"
|
nonebot-adapter-dodo = "^0.1.4"
|
||||||
pillow = "9.5"
|
pillow = "9.5"
|
||||||
@@ -47,10 +46,7 @@ dateparser = "^1.2.0"
|
|||||||
bilireq = "0.2.3post0"
|
bilireq = "0.2.3post0"
|
||||||
python-jose = { extras = ["cryptography"], version = "^3.3.0" }
|
python-jose = { extras = ["cryptography"], version = "^3.3.0" }
|
||||||
python-multipart = "^0.0.9"
|
python-multipart = "^0.0.9"
|
||||||
aiocache = "^0.12.2"
|
nonebot-plugin-alconna = "^0.51.1"
|
||||||
py-cpuinfo = "^9.0.0"
|
|
||||||
nonebot-plugin-uninfo = "^0.4.1"
|
|
||||||
nonebot-plugin-alconna = "^0.53.1"
|
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
nonebug = "^0.3.2"
|
nonebug = "^0.3.2"
|
||||||
@@ -137,9 +133,6 @@ typeCheckingMode = "standard"
|
|||||||
reportShadowedImports = false
|
reportShadowedImports = false
|
||||||
disableBytesTypePromotions = true
|
disableBytesTypePromotions = true
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
|
||||||
asyncio_mode = "auto"
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.0.0"]
|
requires = ["poetry-core>=1.0.0"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|||||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 282 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 205 KiB |