nonebot-plugin-template 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nonebot_plugin_template-0.0.1/PKG-INFO +144 -0
- nonebot_plugin_template-0.0.1/README.md +129 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template/__init__.py +31 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template/config.py +24 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template/matcher.py +17 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template.egg-info/PKG-INFO +144 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template.egg-info/SOURCES.txt +10 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template.egg-info/dependency_links.txt +1 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template.egg-info/requires.txt +7 -0
- nonebot_plugin_template-0.0.1/nonebot_plugin_template.egg-info/top_level.txt +1 -0
- nonebot_plugin_template-0.0.1/pyproject.toml +30 -0
- nonebot_plugin_template-0.0.1/setup.cfg +4 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: nonebot-plugin-template
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: 插件描述
|
5
|
+
Author-email: fllesser <fllessive@gmail.com>
|
6
|
+
Requires-Python: <3.13,>=3.10
|
7
|
+
Description-Content-Type: text/markdown
|
8
|
+
Requires-Dist: httpx<1.0.0,>=0.27.0
|
9
|
+
Requires-Dist: nonebot2<3.0.0,>=2.4.0
|
10
|
+
Requires-Dist: nonebot-adapter-onebot<3.0.0,>=2.4.6
|
11
|
+
Requires-Dist: nonebot-plugin-uninfo<1.0.0,>=0.6.5
|
12
|
+
Requires-Dist: nonebot-plugin-alconna<1.0.0,>=0.54.2
|
13
|
+
Requires-Dist: nonebot-plugin-localstore<1.0.0,>=0.7.3
|
14
|
+
Requires-Dist: nonebot-plugin-apscheduler<1.0.0,>=0.5.0
|
15
|
+
|
16
|
+
<div align="center">
|
17
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/fllesser/nonebot-plugin-template/blob/master/.docs/NoneBotPlugin.svg" width="380" height="177" alt="NoneBotPluginLogo"></a>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div align="center">
|
21
|
+
|
22
|
+
# nonebot-plugin-PPPPP
|
23
|
+
|
24
|
+
_✨ NoneBot 插件简单描述 ✨_
|
25
|
+
|
26
|
+
|
27
|
+
<a href="./LICENSE">
|
28
|
+
<img src="https://img.shields.io/github/license/owner/nonebot-plugin-PPPPP.svg" alt="license">
|
29
|
+
</a>
|
30
|
+
<a href="https://pypi.python.org/pypi/nonebot-plugin-PPPPP">
|
31
|
+
<img src="https://img.shields.io/pypi/v/nonebot-plugin-PPPPP.svg" alt="pypi">
|
32
|
+
</a>
|
33
|
+
<img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
这是一个 nonebot2 插件项目的模板库, 你可以直接使用本模板创建你的 nonebot2 插件项目的仓库
|
38
|
+
|
39
|
+
<details open>
|
40
|
+
<summary>模板库使用方法</summary>
|
41
|
+
|
42
|
+
1. 点击 [](https://github.com/new?template_owner=fllesser&template_name=nonebot-plugin-template&owner=%40me&name=nonebot-plugin-&visibility=public) 创建仓库
|
43
|
+
2. 在创建好的新仓库中, 在 "Add file" 菜单中选择 "Create new file", 在新文件名处输入`LICENSE`, 此时在右侧会出现一个 "Choose a license template" 按钮, 点击此按钮选择开源协议模板, 然后在最下方提交新文件到主分支
|
44
|
+
3. 全局替换`owner`为仓库所有者ID; 全局替换`PPPPP`为插件名; 全局替换`ppppp`为包名; 修改 python 徽标中的版本为你插件的运行所需版本
|
45
|
+
4. 修改 README 中的插件名和插件描述, 并在下方填充相应的内容
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
> [!NOTE]
|
50
|
+
> 模板库中自带了一个发布工作流, 你可以使用此工作流自动发布你的插件到 pypi
|
51
|
+
|
52
|
+
<details>
|
53
|
+
<summary>配置发布工作流</summary>
|
54
|
+
|
55
|
+
1. 前往 https://pypi.org/manage/account/#api-tokens 并创建一个新的 API 令牌。创建成功后不要关闭页面,不然你将无法再次查看此令牌。
|
56
|
+
2. 在单独的浏览器选项卡或窗口中,打开 [Actions secrets and variables](./settings/secrets/actions) 页面。你也可以在 Settings - Secrets and variables - Actions 中找到此页面。
|
57
|
+
3. 点击 New repository secret 按钮,创建一个名为 `PYPI_API_TOKEN` 的新令牌,并从第一步复制粘贴令牌。
|
58
|
+
|
59
|
+
</details>
|
60
|
+
|
61
|
+
> [!IMPORTANT]
|
62
|
+
> 这个发布工作流需要 pyproject.toml 文件, 并且只支持 [PEP 621](https://peps.python.org/pep-0621/) 标准的 pyproject.toml 文件
|
63
|
+
|
64
|
+
<details>
|
65
|
+
<summary>触发发布工作流</summary>
|
66
|
+
从本地推送任意 tag 即可触发。
|
67
|
+
|
68
|
+
创建 tag:
|
69
|
+
|
70
|
+
git tag <tag_name>
|
71
|
+
|
72
|
+
推送本地所有 tag:
|
73
|
+
|
74
|
+
git push origin --tags
|
75
|
+
|
76
|
+
</details>
|
77
|
+
|
78
|
+
## 📖 介绍
|
79
|
+
|
80
|
+
这里是插件的详细介绍部分
|
81
|
+
|
82
|
+
## 💿 安装
|
83
|
+
|
84
|
+
<details open>
|
85
|
+
<summary>使用 nb-cli 安装</summary>
|
86
|
+
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
87
|
+
|
88
|
+
nb plugin install nonebot-plugin-PPPPP --upgrade
|
89
|
+
|
90
|
+
nb plugin install nonebot-plugin-PPPPP --upgrade -i "https://pypi.org/simple"
|
91
|
+
|
92
|
+
|
93
|
+
</details>
|
94
|
+
|
95
|
+
<details>
|
96
|
+
<summary>使用包管理器安装</summary>
|
97
|
+
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
|
98
|
+
|
99
|
+
<details>
|
100
|
+
<summary>pip</summary>
|
101
|
+
|
102
|
+
pip install nonebot-plugin-PPPPP --upgrade -i "https://pypi.org/simple"
|
103
|
+
|
104
|
+
</details>
|
105
|
+
<details>
|
106
|
+
<summary>pdm</summary>
|
107
|
+
|
108
|
+
pdm add nonebot-plugin-PPPPP
|
109
|
+
</details>
|
110
|
+
<details>
|
111
|
+
<summary>poetry</summary>
|
112
|
+
|
113
|
+
poetry add nonebot-plugin-PPPPP
|
114
|
+
</details>
|
115
|
+
<details>
|
116
|
+
<summary>conda</summary>
|
117
|
+
|
118
|
+
conda install nonebot-plugin-PPPPP
|
119
|
+
</details>
|
120
|
+
|
121
|
+
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
|
122
|
+
|
123
|
+
plugins = ["nonebot_plugin_ppppp"]
|
124
|
+
|
125
|
+
</details>
|
126
|
+
|
127
|
+
## ⚙️ 配置
|
128
|
+
|
129
|
+
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
|
130
|
+
|
131
|
+
| 配置项 | 必填 | 默认值 | 说明 |
|
132
|
+
|:-----:|:----:|:----:|:----:|
|
133
|
+
| 配置项1 | 是 | 无 | 配置说明 |
|
134
|
+
| 配置项2 | 否 | 无 | 配置说明 |
|
135
|
+
|
136
|
+
## 🎉 使用
|
137
|
+
### 指令表
|
138
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
139
|
+
|:-----:|:----:|:----:|:----:|:----:|
|
140
|
+
| 指令1 | 主人 | 否 | 私聊 | 指令说明 |
|
141
|
+
| 指令2 | 群员 | 是 | 群聊 | 指令说明 |
|
142
|
+
|
143
|
+
### 效果图
|
144
|
+
如果有效果图的话
|
@@ -0,0 +1,129 @@
|
|
1
|
+
<div align="center">
|
2
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/fllesser/nonebot-plugin-template/blob/master/.docs/NoneBotPlugin.svg" width="380" height="177" alt="NoneBotPluginLogo"></a>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div align="center">
|
6
|
+
|
7
|
+
# nonebot-plugin-PPPPP
|
8
|
+
|
9
|
+
_✨ NoneBot 插件简单描述 ✨_
|
10
|
+
|
11
|
+
|
12
|
+
<a href="./LICENSE">
|
13
|
+
<img src="https://img.shields.io/github/license/owner/nonebot-plugin-PPPPP.svg" alt="license">
|
14
|
+
</a>
|
15
|
+
<a href="https://pypi.python.org/pypi/nonebot-plugin-PPPPP">
|
16
|
+
<img src="https://img.shields.io/pypi/v/nonebot-plugin-PPPPP.svg" alt="pypi">
|
17
|
+
</a>
|
18
|
+
<img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
22
|
+
这是一个 nonebot2 插件项目的模板库, 你可以直接使用本模板创建你的 nonebot2 插件项目的仓库
|
23
|
+
|
24
|
+
<details open>
|
25
|
+
<summary>模板库使用方法</summary>
|
26
|
+
|
27
|
+
1. 点击 [](https://github.com/new?template_owner=fllesser&template_name=nonebot-plugin-template&owner=%40me&name=nonebot-plugin-&visibility=public) 创建仓库
|
28
|
+
2. 在创建好的新仓库中, 在 "Add file" 菜单中选择 "Create new file", 在新文件名处输入`LICENSE`, 此时在右侧会出现一个 "Choose a license template" 按钮, 点击此按钮选择开源协议模板, 然后在最下方提交新文件到主分支
|
29
|
+
3. 全局替换`owner`为仓库所有者ID; 全局替换`PPPPP`为插件名; 全局替换`ppppp`为包名; 修改 python 徽标中的版本为你插件的运行所需版本
|
30
|
+
4. 修改 README 中的插件名和插件描述, 并在下方填充相应的内容
|
31
|
+
|
32
|
+
</details>
|
33
|
+
|
34
|
+
> [!NOTE]
|
35
|
+
> 模板库中自带了一个发布工作流, 你可以使用此工作流自动发布你的插件到 pypi
|
36
|
+
|
37
|
+
<details>
|
38
|
+
<summary>配置发布工作流</summary>
|
39
|
+
|
40
|
+
1. 前往 https://pypi.org/manage/account/#api-tokens 并创建一个新的 API 令牌。创建成功后不要关闭页面,不然你将无法再次查看此令牌。
|
41
|
+
2. 在单独的浏览器选项卡或窗口中,打开 [Actions secrets and variables](./settings/secrets/actions) 页面。你也可以在 Settings - Secrets and variables - Actions 中找到此页面。
|
42
|
+
3. 点击 New repository secret 按钮,创建一个名为 `PYPI_API_TOKEN` 的新令牌,并从第一步复制粘贴令牌。
|
43
|
+
|
44
|
+
</details>
|
45
|
+
|
46
|
+
> [!IMPORTANT]
|
47
|
+
> 这个发布工作流需要 pyproject.toml 文件, 并且只支持 [PEP 621](https://peps.python.org/pep-0621/) 标准的 pyproject.toml 文件
|
48
|
+
|
49
|
+
<details>
|
50
|
+
<summary>触发发布工作流</summary>
|
51
|
+
从本地推送任意 tag 即可触发。
|
52
|
+
|
53
|
+
创建 tag:
|
54
|
+
|
55
|
+
git tag <tag_name>
|
56
|
+
|
57
|
+
推送本地所有 tag:
|
58
|
+
|
59
|
+
git push origin --tags
|
60
|
+
|
61
|
+
</details>
|
62
|
+
|
63
|
+
## 📖 介绍
|
64
|
+
|
65
|
+
这里是插件的详细介绍部分
|
66
|
+
|
67
|
+
## 💿 安装
|
68
|
+
|
69
|
+
<details open>
|
70
|
+
<summary>使用 nb-cli 安装</summary>
|
71
|
+
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
72
|
+
|
73
|
+
nb plugin install nonebot-plugin-PPPPP --upgrade
|
74
|
+
|
75
|
+
nb plugin install nonebot-plugin-PPPPP --upgrade -i "https://pypi.org/simple"
|
76
|
+
|
77
|
+
|
78
|
+
</details>
|
79
|
+
|
80
|
+
<details>
|
81
|
+
<summary>使用包管理器安装</summary>
|
82
|
+
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
|
83
|
+
|
84
|
+
<details>
|
85
|
+
<summary>pip</summary>
|
86
|
+
|
87
|
+
pip install nonebot-plugin-PPPPP --upgrade -i "https://pypi.org/simple"
|
88
|
+
|
89
|
+
</details>
|
90
|
+
<details>
|
91
|
+
<summary>pdm</summary>
|
92
|
+
|
93
|
+
pdm add nonebot-plugin-PPPPP
|
94
|
+
</details>
|
95
|
+
<details>
|
96
|
+
<summary>poetry</summary>
|
97
|
+
|
98
|
+
poetry add nonebot-plugin-PPPPP
|
99
|
+
</details>
|
100
|
+
<details>
|
101
|
+
<summary>conda</summary>
|
102
|
+
|
103
|
+
conda install nonebot-plugin-PPPPP
|
104
|
+
</details>
|
105
|
+
|
106
|
+
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
|
107
|
+
|
108
|
+
plugins = ["nonebot_plugin_ppppp"]
|
109
|
+
|
110
|
+
</details>
|
111
|
+
|
112
|
+
## ⚙️ 配置
|
113
|
+
|
114
|
+
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
|
115
|
+
|
116
|
+
| 配置项 | 必填 | 默认值 | 说明 |
|
117
|
+
|:-----:|:----:|:----:|:----:|
|
118
|
+
| 配置项1 | 是 | 无 | 配置说明 |
|
119
|
+
| 配置项2 | 否 | 无 | 配置说明 |
|
120
|
+
|
121
|
+
## 🎉 使用
|
122
|
+
### 指令表
|
123
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
124
|
+
|:-----:|:----:|:----:|:----:|:----:|
|
125
|
+
| 指令1 | 主人 | 否 | 私聊 | 指令说明 |
|
126
|
+
| 指令2 | 群员 | 是 | 群聊 | 指令说明 |
|
127
|
+
|
128
|
+
### 效果图
|
129
|
+
如果有效果图的话
|
@@ -0,0 +1,31 @@
|
|
1
|
+
from nonebot import (
|
2
|
+
require, # noqa: F401
|
3
|
+
get_driver, # @get_driver().on_startup 装饰启动时运行函数 # noqa: F401
|
4
|
+
get_bots, # dict[str, BaseBot] 常用于定时器获取 BOT 对象 # noqa: F401
|
5
|
+
)
|
6
|
+
from nonebot.plugin import (
|
7
|
+
PluginMetadata,
|
8
|
+
inherit_supported_adapters
|
9
|
+
)
|
10
|
+
|
11
|
+
require("nonebot_plugin_uninfo")
|
12
|
+
require("nonebot_plugin_alconna")
|
13
|
+
require("nonebot_plugin_localstore")
|
14
|
+
require("nonebot_plugin_apscheduler")
|
15
|
+
|
16
|
+
from .config import Config # noqa: E402
|
17
|
+
|
18
|
+
|
19
|
+
__plugin_meta__ = PluginMetadata(
|
20
|
+
name="名称",
|
21
|
+
description="描述",
|
22
|
+
usage="用法",
|
23
|
+
type="application", # library
|
24
|
+
homepage="https://github.com/用户名/nonebot-plugin-",
|
25
|
+
config=Config,
|
26
|
+
supported_adapters=inherit_supported_adapters(
|
27
|
+
"nonebot_plugin_alconna", "nonebot_plugin_uninfo"
|
28
|
+
),
|
29
|
+
# supported_adapters={"~onebot.v11"},
|
30
|
+
extra={"author": "fllesser <fllessive@gmail.com>"},
|
31
|
+
)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from nonebot import (
|
2
|
+
get_driver,
|
3
|
+
get_plugin_config
|
4
|
+
)
|
5
|
+
from pydantic import BaseModel
|
6
|
+
from pathlib import Path
|
7
|
+
from typing import List, Literal, Optional # noqa: F401
|
8
|
+
|
9
|
+
from nonebot_plugin_apscheduler import scheduler # noqa: F401
|
10
|
+
import nonebot_plugin_localstore as store
|
11
|
+
|
12
|
+
class Config(BaseModel):
|
13
|
+
pass
|
14
|
+
|
15
|
+
cache_dir: Path = store.get_plugin_cache_dir()
|
16
|
+
config_dir: Path = store.get_plugin_config_dir()
|
17
|
+
data_dir: Path = store.get_plugin_data_dir()
|
18
|
+
|
19
|
+
# 配置加载
|
20
|
+
config: Config = get_plugin_config(Config)
|
21
|
+
gconfig = get_driver().config
|
22
|
+
|
23
|
+
# 全局名称
|
24
|
+
NICKNAME: str = next(iter(gconfig.nickname), None)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
from nonebot_plugin_alconna import on_alconna # noqa: F401
|
2
|
+
from arclet.alconna import (
|
3
|
+
Args,
|
4
|
+
Alconna,
|
5
|
+
Option,
|
6
|
+
Subcommand
|
7
|
+
)
|
8
|
+
|
9
|
+
alc = Alconna(
|
10
|
+
"pip",
|
11
|
+
Subcommand(
|
12
|
+
"install",
|
13
|
+
Args["package", str],
|
14
|
+
Option("-r|--requirement", Args["file", str]),
|
15
|
+
Option("-i|--index-url", Args["url", str]),
|
16
|
+
)
|
17
|
+
)
|
@@ -0,0 +1,144 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: nonebot-plugin-template
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: 插件描述
|
5
|
+
Author-email: fllesser <fllessive@gmail.com>
|
6
|
+
Requires-Python: <3.13,>=3.10
|
7
|
+
Description-Content-Type: text/markdown
|
8
|
+
Requires-Dist: httpx<1.0.0,>=0.27.0
|
9
|
+
Requires-Dist: nonebot2<3.0.0,>=2.4.0
|
10
|
+
Requires-Dist: nonebot-adapter-onebot<3.0.0,>=2.4.6
|
11
|
+
Requires-Dist: nonebot-plugin-uninfo<1.0.0,>=0.6.5
|
12
|
+
Requires-Dist: nonebot-plugin-alconna<1.0.0,>=0.54.2
|
13
|
+
Requires-Dist: nonebot-plugin-localstore<1.0.0,>=0.7.3
|
14
|
+
Requires-Dist: nonebot-plugin-apscheduler<1.0.0,>=0.5.0
|
15
|
+
|
16
|
+
<div align="center">
|
17
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/fllesser/nonebot-plugin-template/blob/master/.docs/NoneBotPlugin.svg" width="380" height="177" alt="NoneBotPluginLogo"></a>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div align="center">
|
21
|
+
|
22
|
+
# nonebot-plugin-PPPPP
|
23
|
+
|
24
|
+
_✨ NoneBot 插件简单描述 ✨_
|
25
|
+
|
26
|
+
|
27
|
+
<a href="./LICENSE">
|
28
|
+
<img src="https://img.shields.io/github/license/owner/nonebot-plugin-PPPPP.svg" alt="license">
|
29
|
+
</a>
|
30
|
+
<a href="https://pypi.python.org/pypi/nonebot-plugin-PPPPP">
|
31
|
+
<img src="https://img.shields.io/pypi/v/nonebot-plugin-PPPPP.svg" alt="pypi">
|
32
|
+
</a>
|
33
|
+
<img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
这是一个 nonebot2 插件项目的模板库, 你可以直接使用本模板创建你的 nonebot2 插件项目的仓库
|
38
|
+
|
39
|
+
<details open>
|
40
|
+
<summary>模板库使用方法</summary>
|
41
|
+
|
42
|
+
1. 点击 [](https://github.com/new?template_owner=fllesser&template_name=nonebot-plugin-template&owner=%40me&name=nonebot-plugin-&visibility=public) 创建仓库
|
43
|
+
2. 在创建好的新仓库中, 在 "Add file" 菜单中选择 "Create new file", 在新文件名处输入`LICENSE`, 此时在右侧会出现一个 "Choose a license template" 按钮, 点击此按钮选择开源协议模板, 然后在最下方提交新文件到主分支
|
44
|
+
3. 全局替换`owner`为仓库所有者ID; 全局替换`PPPPP`为插件名; 全局替换`ppppp`为包名; 修改 python 徽标中的版本为你插件的运行所需版本
|
45
|
+
4. 修改 README 中的插件名和插件描述, 并在下方填充相应的内容
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
> [!NOTE]
|
50
|
+
> 模板库中自带了一个发布工作流, 你可以使用此工作流自动发布你的插件到 pypi
|
51
|
+
|
52
|
+
<details>
|
53
|
+
<summary>配置发布工作流</summary>
|
54
|
+
|
55
|
+
1. 前往 https://pypi.org/manage/account/#api-tokens 并创建一个新的 API 令牌。创建成功后不要关闭页面,不然你将无法再次查看此令牌。
|
56
|
+
2. 在单独的浏览器选项卡或窗口中,打开 [Actions secrets and variables](./settings/secrets/actions) 页面。你也可以在 Settings - Secrets and variables - Actions 中找到此页面。
|
57
|
+
3. 点击 New repository secret 按钮,创建一个名为 `PYPI_API_TOKEN` 的新令牌,并从第一步复制粘贴令牌。
|
58
|
+
|
59
|
+
</details>
|
60
|
+
|
61
|
+
> [!IMPORTANT]
|
62
|
+
> 这个发布工作流需要 pyproject.toml 文件, 并且只支持 [PEP 621](https://peps.python.org/pep-0621/) 标准的 pyproject.toml 文件
|
63
|
+
|
64
|
+
<details>
|
65
|
+
<summary>触发发布工作流</summary>
|
66
|
+
从本地推送任意 tag 即可触发。
|
67
|
+
|
68
|
+
创建 tag:
|
69
|
+
|
70
|
+
git tag <tag_name>
|
71
|
+
|
72
|
+
推送本地所有 tag:
|
73
|
+
|
74
|
+
git push origin --tags
|
75
|
+
|
76
|
+
</details>
|
77
|
+
|
78
|
+
## 📖 介绍
|
79
|
+
|
80
|
+
这里是插件的详细介绍部分
|
81
|
+
|
82
|
+
## 💿 安装
|
83
|
+
|
84
|
+
<details open>
|
85
|
+
<summary>使用 nb-cli 安装</summary>
|
86
|
+
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
87
|
+
|
88
|
+
nb plugin install nonebot-plugin-PPPPP --upgrade
|
89
|
+
|
90
|
+
nb plugin install nonebot-plugin-PPPPP --upgrade -i "https://pypi.org/simple"
|
91
|
+
|
92
|
+
|
93
|
+
</details>
|
94
|
+
|
95
|
+
<details>
|
96
|
+
<summary>使用包管理器安装</summary>
|
97
|
+
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
|
98
|
+
|
99
|
+
<details>
|
100
|
+
<summary>pip</summary>
|
101
|
+
|
102
|
+
pip install nonebot-plugin-PPPPP --upgrade -i "https://pypi.org/simple"
|
103
|
+
|
104
|
+
</details>
|
105
|
+
<details>
|
106
|
+
<summary>pdm</summary>
|
107
|
+
|
108
|
+
pdm add nonebot-plugin-PPPPP
|
109
|
+
</details>
|
110
|
+
<details>
|
111
|
+
<summary>poetry</summary>
|
112
|
+
|
113
|
+
poetry add nonebot-plugin-PPPPP
|
114
|
+
</details>
|
115
|
+
<details>
|
116
|
+
<summary>conda</summary>
|
117
|
+
|
118
|
+
conda install nonebot-plugin-PPPPP
|
119
|
+
</details>
|
120
|
+
|
121
|
+
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
|
122
|
+
|
123
|
+
plugins = ["nonebot_plugin_ppppp"]
|
124
|
+
|
125
|
+
</details>
|
126
|
+
|
127
|
+
## ⚙️ 配置
|
128
|
+
|
129
|
+
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
|
130
|
+
|
131
|
+
| 配置项 | 必填 | 默认值 | 说明 |
|
132
|
+
|:-----:|:----:|:----:|:----:|
|
133
|
+
| 配置项1 | 是 | 无 | 配置说明 |
|
134
|
+
| 配置项2 | 否 | 无 | 配置说明 |
|
135
|
+
|
136
|
+
## 🎉 使用
|
137
|
+
### 指令表
|
138
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
139
|
+
|:-----:|:----:|:----:|:----:|:----:|
|
140
|
+
| 指令1 | 主人 | 否 | 私聊 | 指令说明 |
|
141
|
+
| 指令2 | 群员 | 是 | 群聊 | 指令说明 |
|
142
|
+
|
143
|
+
### 效果图
|
144
|
+
如果有效果图的话
|
@@ -0,0 +1,10 @@
|
|
1
|
+
README.md
|
2
|
+
pyproject.toml
|
3
|
+
nonebot_plugin_template/__init__.py
|
4
|
+
nonebot_plugin_template/config.py
|
5
|
+
nonebot_plugin_template/matcher.py
|
6
|
+
nonebot_plugin_template.egg-info/PKG-INFO
|
7
|
+
nonebot_plugin_template.egg-info/SOURCES.txt
|
8
|
+
nonebot_plugin_template.egg-info/dependency_links.txt
|
9
|
+
nonebot_plugin_template.egg-info/requires.txt
|
10
|
+
nonebot_plugin_template.egg-info/top_level.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
nonebot_plugin_template
|
@@ -0,0 +1,30 @@
|
|
1
|
+
[project]
|
2
|
+
name = "nonebot-plugin-template"
|
3
|
+
version = "0.0.1"
|
4
|
+
description = "插件描述"
|
5
|
+
readme = "README.md"
|
6
|
+
authors = [{name = "fllesser", email = "fllessive@gmail.com"}]
|
7
|
+
requires-python =">=3.10,<3.13"
|
8
|
+
dependencies = [
|
9
|
+
"httpx>=0.27.0,<1.0.0",
|
10
|
+
"nonebot2>=2.4.0,<3.0.0",
|
11
|
+
"nonebot-adapter-onebot>=2.4.6,<3.0.0",
|
12
|
+
"nonebot-plugin-uninfo>=0.6.5,<1.0.0",
|
13
|
+
"nonebot-plugin-alconna>=0.54.2,<1.0.0",
|
14
|
+
"nonebot-plugin-localstore>=0.7.3,<1.0.0",
|
15
|
+
"nonebot-plugin-apscheduler>=0.5.0,<1.0.0",
|
16
|
+
]
|
17
|
+
|
18
|
+
[dependency-groups]
|
19
|
+
dev = [
|
20
|
+
"nonebot2[fastapi]>=2.4.0,<3.0.0",
|
21
|
+
"nonebot-adapter-onebot>=2.4.6,<3.0.0"
|
22
|
+
]
|
23
|
+
|
24
|
+
lint = [
|
25
|
+
"ruff"
|
26
|
+
]
|
27
|
+
|
28
|
+
|
29
|
+
[tool.nonebot]
|
30
|
+
plugins = ["nonebot_plugin_template"]
|