4 Commits

Author SHA1 Message Date
ff44d8c547 update readme 2022-07-24 11:50:47 +06:00
a3a528bd19 fix in CommandsPlugin double commands getting 2022-07-24 11:46:06 +06:00
814603f996 start 0.1.3 2022-07-24 11:44:53 +06:00
30b7a82355 Merge pull request #3 from InsanusMokrassar/0.1.2
0.1.2
2022-07-22 23:55:21 +06:00
4 changed files with 26 additions and 22 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## 0.1.3
* Fix of double commands getting on a start of bot
## 0.1.2
* `Versions`:

View File

@@ -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>
```

View File

@@ -4,4 +4,4 @@ kotlin.js.generate.externals=true
kotlin.incremental=true
project_group=dev.inmo
project_version=0.1.2
project_version=0.1.3

View File

@@ -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" }
}