Skip to content

Commit

Permalink
feat: auto_update config
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Jul 20, 2023
1 parent fb95a5d commit 15fe4cc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@
| `/<stats> <contribution> [name]` | 查看贡献 |
| `/<stats> <trophy> [name]` | 查看奖杯 |

### GitHubUpdateCommand

| 指令 | 描述 |
|:------------|:-------|
| `/<update>` | 检查插件更新 |

## 自动通过加群问题放行开发者

`1.1.7` 起对接到 [mirai-administrator](https://github.com/cssxsh/mirai-administrator) 实现此功能
Expand All @@ -121,6 +127,7 @@
* `percentages` 加群放行 GitHub 活跃等级(百分制),默认0,不开启功能
* `sign_member_join` 加群放行提示信息
* `github_readme_stats` stats card 绘制参数
* `auto_update` 启动时检查插件更新

## 安装

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ internal object GitHubHelperPlugin : KotlinPlugin(
val target = resolveConfigFile("update.dict.json")
logger.info { "1.3.0 起提供从 github 更新<其他插件>的功能, 如有需要, 请编辑:\n ${target.toPath().toUri()}" }
GitHubReleasePluginUpdater.reload(target)
GitHubReleasePluginUpdater.update()
if (GitHubConfig.update) {
GitHubReleasePluginUpdater.update()
}
}

override fun onDisable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ public object GitHubConfig : ReadOnlyPluginConfig("GithubConfig") {
"include_all_commits" to "true"
)
)

@ValueName("auto_update")
@ValueDescription("启动时检查插件更新")
public val update: Boolean by value(true)
}

0 comments on commit 15fe4cc

Please sign in to comment.