mirror of
https://github.com/InsanusMokrassar/PlaguBotCommandsPlugin.git
synced 2025-09-15 21:29:18 +00:00
Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
6941f7ef02 | |||
2e39ed4a76 | |||
21a17579a3 | |||
c96dfd8062 | |||
d54ae20571 | |||
4f25549bf5 | |||
47eefd0d77 | |||
ff44d8c547 | |||
a3a528bd19 | |||
814603f996 | |||
30b7a82355 | |||
277120c07b | |||
f9fab4741a | |||
84139e2c03 | |||
44524d847a | |||
9ee3b26f7e | |||
72407c0c8e | |||
2f62c44c18 | |||
8c1c33fdf2 | |||
1f76c441e3 | |||
9df1efd4c8 | |||
6372f8af9f | |||
acbc6ff45b | |||
f3c07f0a7d | |||
7a62373030 |
21
.github/workflows/kdocs.yml
vendored
Normal file
21
.github/workflows/kdocs.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Publish KDocs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
publishing:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Build
|
||||
run: ./gradlew dokkaHtml
|
||||
- name: Publish KDocs
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./build/dokka/html
|
||||
publish_branch: kdocs
|
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,5 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
## 0.2.1
|
||||
|
||||
* `Versions`:
|
||||
* `plagubot`: `1.4.1`
|
||||
* `kslog`: `0.4.2`
|
||||
|
||||
## 0.1.3
|
||||
|
||||
* Fix of double commands getting on a start of bot
|
||||
|
||||
## 0.1.2
|
||||
|
||||
* `Versions`:
|
||||
* `plagubot`: `1.3.1`
|
||||
|
||||
## 0.1.1
|
||||
|
||||
* `Versions`:
|
||||
* `plagubot`: `1.3.0`
|
||||
|
||||
## 0.1.0
|
||||
|
||||
* Project has been created
|
||||
|
40
README.md
40
README.md
@@ -5,6 +5,26 @@
|
||||
This plugin has been created for centralized work with commands in your plugins. You may pass your commands (even in
|
||||
runtime) and they will automatically appear in bot commands for users
|
||||
|
||||
## How to include
|
||||
|
||||
Add dependency:
|
||||
|
||||
Gradle:
|
||||
|
||||
```groovy
|
||||
api "dev.inmo:plagubot.plugins.commands:$commands_version"
|
||||
```
|
||||
|
||||
Maven:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>dev.inmo</groupId>
|
||||
<artifactId>plagubot.plugins.commands</artifactId>
|
||||
<version>${commands_version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## How to use
|
||||
|
||||
End user should include in his plugins section next line:
|
||||
@@ -54,23 +74,3 @@ retrieved from `koin` via simple `koin.get<CommandsKeeper>()` or `koin.commandsK
|
||||
|
||||
Just as in the code above (in `setupDI`) you may pass all the command environment and it will be automatically updated
|
||||
for bot.
|
||||
|
||||
## How to include
|
||||
|
||||
Add dependency:
|
||||
|
||||
Gradle:
|
||||
|
||||
```groovy
|
||||
api "dev.inmo:plagubot.plugins.commands:$commands_version"
|
||||
```
|
||||
|
||||
Maven:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>dev.inmo</groupId>
|
||||
<artifactId>plagubot.plugins.commands</artifactId>
|
||||
<version>${commands_version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
17
build.gradle
17
build.gradle
@@ -1,18 +1,21 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath libs.kotlin.gradle.plugin
|
||||
classpath libs.kotlin.serialization.plugin
|
||||
classpath libs.gh.release.plugin
|
||||
classpath libs.jb.dokka.plugin
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
alias libs.plugins.kotlin.jvm
|
||||
alias libs.plugins.kotlin.serialization
|
||||
alias libs.plugins.jetbrains.dokka
|
||||
}
|
||||
|
||||
project.group = project_group
|
||||
@@ -31,3 +34,17 @@ dependencies {
|
||||
api libs.plagubot.plugin
|
||||
api libs.kslog
|
||||
}
|
||||
|
||||
tasks.dokkaHtml {
|
||||
dokkaSourceSets {
|
||||
configureEach {
|
||||
skipDeprecated.set(true)
|
||||
|
||||
sourceLink {
|
||||
localDirectory.set(file("./"))
|
||||
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/PlaguBotCommandsPlugin/blob/master/"))
|
||||
remoteLineSuffix.set("#L")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,4 +4,4 @@ kotlin.js.generate.externals=true
|
||||
kotlin.incremental=true
|
||||
|
||||
project_group=dev.inmo
|
||||
project_version=0.1.0
|
||||
project_version=0.2.1
|
||||
|
@@ -1,9 +1,10 @@
|
||||
[versions]
|
||||
|
||||
kotlin = "1.6.21"
|
||||
plagubot = "1.2.3"
|
||||
kslog = "0.3.2"
|
||||
plagubot = "1.4.1"
|
||||
kslog = "0.4.2"
|
||||
gh-release = "2.4.1"
|
||||
jb-dokka = "1.6.21"
|
||||
|
||||
[libraries]
|
||||
|
||||
@@ -15,8 +16,10 @@ kslog = { module = "dev.inmo:kslog", version.ref = "kslog" }
|
||||
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||
kotlin-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
|
||||
gh-release-plugin = { module = "com.github.breadmoirai:github-release", version.ref = "gh-release" }
|
||||
jb-dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "jb-dokka" }
|
||||
|
||||
[plugins]
|
||||
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "jb-dokka" }
|
||||
|
@@ -72,7 +72,7 @@ object CommandsPlugin : Plugin {
|
||||
commandsKeeper.getKeys().forEach {
|
||||
val commands = commandsKeeper.getCommands(it)
|
||||
log.d { "Start setup initially passed commands for key $it: ${commands ?.joinToString { it.command }}" }
|
||||
setScopeCommands(it, commandsKeeper.getCommands(it))
|
||||
setScopeCommands(it, commands)
|
||||
}
|
||||
log.d { "Complete setup initially passed commands" }
|
||||
}
|
||||
|
Reference in New Issue
Block a user