Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-act
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-act
Commits
2d42db99
Commit
2d42db99
authored
Aug 04, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme
parent
cc7125b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
2 deletions
+63
-2
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
README.md
README.md
+62
-1
No files found.
.gitlab-ci.yml
View file @
2d42db99
...
@@ -23,7 +23,7 @@ upload_to_minio:
...
@@ -23,7 +23,7 @@ upload_to_minio:
tags
:
tags
:
-
linux
-
linux
script
:
script
:
-
aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://nanahira/koishi-plugin/
hisoutensoku-jammer
-
aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://nanahira/koishi-plugin/
act
only
:
only
:
-
master
-
master
...
...
README.md
View file @
2d42db99
# koishi-plugin-
ini
t
# koishi-plugin-
ac
t
小剧场公演插件。
这个插件只能在 OneBot 运行,需要提前设置好剧本。
公演剧本可以通过 https://www.wenaiwu.net/pb/ 粘贴聊天记录生成。
## 安装
### npm
```
bash
npm
install
koishi-plugin-act
```
### 直接安装
在 https://cdn01.moecube.com/nanahira/koishi-plugin/act/index.js 下载,并配置
`koishi.config.js`
。
```
js
module
.
exports
=
{
plugins
:
{
"
/path/to/hisoutensoku-jammer/index.js
"
:
{
adminContext
:
(
ctx
)
=>
ctx
.
private
(),
autoChangeName
:
true
,
dropHelp
:
false
,
playbookPathPrefix
:
'
./playbooks
'
}
}
}
```
## 配置
```
ts
export
interface
Config
{
adminContext
:
(
ctx
:
Context
)
=>
Context
;
autoChangeName
:
boolean
;
dropHelp
:
boolean
;
playbookPathPrefix
:
string
;
}
```
### 说明
*
`adminContext`
一个上下文函数,设置管理员接口作用域。如
`(ctx) => ctx.private('1111111111')`
为只对 QQ 号是 1111111111 的私聊消息有效。
*
`autoChangeName`
公演开始之前是否修改每个演员机器人的群名片。推荐开启。
*
`dropHelp`
是否删除
`help`
命令,避免社死 (?)
*
`playbookPathPrefix`
公演剧本存放路径。公演剧本的文件名是
`/path/to/playbookPathPrefix/name.json`
对应于 name 剧本。
## 命令
*
`act [groupId:number]`
获取公演状态。不带参数获取所有正在公演的群,带参数则获取特定群。
*
`act.create <groupId:number> <playbookFilename:string> [...specificCharacters]`
创建公演
*
`groupId`
目标群。
`playbookFilename`
是公演剧本文件,需要在服务器放好。后面的参数可以以 人物名=帐号 的形式指定特定的人物,否则随机分配。
*
例:
`act.create 11111111 play1 幽幽子=2222222`
在群 11111111 创建一个公演,剧本是 play1,位于
`/path/to/playbookPathPrefix/play1.json`
,同时指定人物幽幽子为 2222222 扮演。
*
`.delete <groupId:number>`
停止公演。
\ No newline at end of file
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