Skip to content

Commit 48ffed7

Browse files
committed
feat: update command
1 parent 9699c85 commit 48ffed7

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package io.github.gnuf0rce.mirai.github.command
2+
3+
import io.github.gnuf0rce.mirai.github.*
4+
import net.mamoe.mirai.console.command.*
5+
6+
public object GitHubUpdateCommand : SimpleCommand(
7+
owner = GitHubHelperPlugin,
8+
"update",
9+
description = "Update Plugin of GitHub Release"
10+
) {
11+
@Handler
12+
public fun ConsoleCommandSender.handle() {
13+
try {
14+
GitHubReleasePluginUpdater.update()
15+
} catch (cause: Throwable) {
16+
logger.warning(name, cause)
17+
}
18+
}
19+
}

src/main/resources/META-INF/services/net.mamoe.mirai.console.command.Command

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ io.github.gnuf0rce.mirai.github.command.GitHubRepoCommitCommand
44
io.github.gnuf0rce.mirai.github.command.GitHubRepoIssueCommand
55
io.github.gnuf0rce.mirai.github.command.GitHubRepoPullCommand
66
io.github.gnuf0rce.mirai.github.command.GitHubRepoReleaseCommand
7-
io.github.gnuf0rce.mirai.github.command.GitHubStatsCommand
7+
io.github.gnuf0rce.mirai.github.command.GitHubStatsCommand
8+
io.github.gnuf0rce.mirai.github.command.GitHubUpdateCommand

0 commit comments

Comments
 (0)