Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-pics
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
koishi-plugin-pics
Commits
6d002045
Commit
6d002045
authored
Mar 30, 2022
by
Maiko Sinkyaet Tan
Committed by
GitHub
Mar 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re
parent
0211282b
Pipeline
#11347
passed with stage
in 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
README.md
README.md
+8
-11
No files found.
README.md
View file @
6d002045
...
...
@@ -6,13 +6,13 @@ Koishi 的随机图片插件
你可以选择通过 koishi 的插件市场安装本插件,也可以使用 npm 或 yarn 等包管理器安装。
### 插件市场
###
通过
插件市场
如果你通过 koishi 的
[
模板项目
](
https://koishi.js.org/guide/introduction/template.html
)
创建了你的机器人项目,你可以直接从插件市场安装本插件。详情请参考
[
安装和配置插件
](
https://koishi.js.org/guide/introduction/template.html#%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AE%E6%8F%92%E4%BB%B6
)
### 包管理器
###
通过
包管理器
推荐使用 yarn 安装插件,当然,
也可以使用 npm 安装。
由于 koishi 现在的默认包管理器是 yarn,因此推荐使用 yarn 安装插件,当然,你
也可以使用 npm 安装。
```
bash
# 如果你使用 yarn
...
...
@@ -21,7 +21,7 @@ yarn add koishi-plugin-pics
npm
install
koishi-plugin-pics
```
##
快速开始
##
开始使用
由于 pics 仅仅是一个随机图片的插件框架,你必须添加至少一个图源插件才能使用。此处以
[
koishi-plugin-picsource-lolicon
](
https://npmjs.com/package/koishi-plugin-picsource-lolicon
)
和
[
koishi-plugin-picsource-yande
](
https://npmjs.com/package/koishi-plugin-picsource-yande
)
为例,你可以在插件市场搜索相应的名字或者使用 yarn 直接安装。
...
...
@@ -33,8 +33,6 @@ plugins:
pics
:
commandName
:
pic
picsource-lolicon
:
# Lolicon 图源
$install
:
true
$community
:
true
name
:
lolicon
r18
:
2
tags
:
...
...
@@ -45,8 +43,6 @@ plugins:
isDefault
:
true
weight
:
2
picsource-yande
:
# Yande 图源插件
$install
:
true
$community
:
true
instances
:
-
name
:
yande
# Yande 图源
tags
:
...
...
@@ -80,8 +76,9 @@ plugins:
### 获取随机图片
```
```
text
pic
获取随机图片
从各个图源中随机获取一张随机图片。图源可以用 pic.sources 查询。参数均为可选。
可用的选项有:
...
...
@@ -95,7 +92,7 @@ pic.sources 查询图源列表
### 查询图源列表
```
```
text
pic.sources
查询图源列表
图源标签可用于图片获取的图源筛选。
...
...
@@ -123,7 +120,6 @@ koishi-plugin-pics 的配置如下表所示:
|description|string|否|图源的描述|
|isDefault|boolean|否|是否默认图源,若设置为 false 或不设置,则需要通过
`-s`
选项指定图源才能调用|
```
yaml
plugins
:
pics
:
...
...
@@ -209,6 +205,7 @@ export default class SomePlugin {
}
}
```
## 贡献代码
如果你想要向本插件贡献代码,或开发新的图源插件,请参阅
[
CONTRIBUTING.md
](
./CONTRIBUTING.md
)
。
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment