mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2025-12-05 05:45:57 +00:00
Compare commits
77 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b14343cc5 | |||
| 62c1f87e95 | |||
| 317f15bbb8 | |||
| 34c0c05715 | |||
| d23bde75b5 | |||
| 46e48efe52 | |||
| 1bf59c20d4 | |||
| 3592a5907c | |||
| 328a8b215c | |||
| 57ba6411e4 | |||
| 4d53d2dc63 | |||
| 2671794f22 | |||
| 9eff09ca68 | |||
| 7f1d972105 | |||
| d05413a54e | |||
| 2342bd9a38 | |||
| c9a6df5614 | |||
| 295f1ce7ab | |||
| 4ca97546b5 | |||
| 166dc4b729 | |||
| f09929648e | |||
| 7d906e0c9c | |||
| dc32a4eb7f | |||
| 5b5f95e0ec | |||
| a0fd9012d2 | |||
| 14910ed568 | |||
| ccc936f821 | |||
| 877e693eb3 | |||
| 9f3634f2ec | |||
| 08d905805a | |||
| 92cf2167cd | |||
| 3d6a208aa8 | |||
| 6e61f364da | |||
| 399fcb8466 | |||
| 477d83e31b | |||
| e761f84023 | |||
| caca21fac9 | |||
| 4f2934fbae | |||
| 8c3c52c92b | |||
| 779b56394a | |||
| 3b11cdc2c6 | |||
| 1a823cda6f | |||
| 6a29264caf | |||
| 4d32de8c2f | |||
| f7cce657a8 | |||
| a4ca827a5c | |||
| 224107e35e | |||
| 9efebd027d | |||
| 841156e8b5 | |||
| ab4d06a44c | |||
| 0766bf7d76 | |||
| f7c7e338e2 | |||
| 6a4fed07ee | |||
| 88f5fbfd18 | |||
| f644817c04 | |||
| 8a8eb3c3b7 | |||
| 8cb68495c9 | |||
| 6f2c922edf | |||
| 5895335031 | |||
| 5f25250bcc | |||
| f0d2a6d39d | |||
| 3e4dc1fdb0 | |||
| 55012eacec | |||
| c64314fa11 | |||
| f0b7ae7325 | |||
| 4ade949593 | |||
| 2a9342e4c7 | |||
| 7d57ceafaa | |||
| 823a53d5aa | |||
| c1889ceff0 | |||
| 40c4ae128f | |||
| 0f59009300 | |||
| a273f1117f | |||
| c8bb5e1195 | |||
| fbd98d67a9 | |||
| 2350555fbb | |||
| 4130f98caa |
0
.fleet/settings.json
Normal file
0
.fleet/settings.json
Normal file
129
CHANGELOG.md
129
CHANGELOG.md
@@ -1,5 +1,134 @@
|
||||
# Changelog
|
||||
|
||||
## 3.5.0
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `5.2.0`
|
||||
* `microutils`: `0.16.10`
|
||||
* `koin`: `3.3.2`
|
||||
|
||||
## 3.4.1
|
||||
|
||||
* `setupBotPlugin` now works synchronously
|
||||
|
||||
## 3.4.0
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `5.1.0`
|
||||
* `microutils`: `0.16.8`
|
||||
* `ktor`: `2.2.3`
|
||||
|
||||
## 3.3.1
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `5.0.1`
|
||||
* `microutils`: `0.16.6`
|
||||
* `ktor`: `2.2.2`
|
||||
|
||||
## 3.3.0
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `5.0.0`
|
||||
|
||||
## 3.2.3
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `4.2.3`
|
||||
* `microutils`: `0.16.4`
|
||||
|
||||
## 3.2.2
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `4.2.2`
|
||||
* `microutils`: `0.16.2`
|
||||
|
||||
## 3.2.1
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `4.2.1`
|
||||
* `microutils`: `0.16.0`
|
||||
* `ktor`: `2.2.1`
|
||||
|
||||
## 3.2.0
|
||||
|
||||
* `Versions`:
|
||||
* `kotlin`: `1.7.22`
|
||||
* `tgbotapi`: `4.2.0`
|
||||
* `microutils`: `0.15.0`
|
||||
* `kslog`: `0.5.4`
|
||||
* `sqlite`: `3.40.0.0`
|
||||
|
||||
## 3.1.4
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `4.1.3`
|
||||
* `microutils`: `0.14.4`
|
||||
|
||||
## 3.1.3
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `4.1.2`
|
||||
|
||||
## 3.1.2
|
||||
|
||||
* `Versions`:
|
||||
* `microutils`: `0.14.2`
|
||||
* `exposed`: `0.41.1`
|
||||
|
||||
## 3.1.1
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `4.1.1`
|
||||
|
||||
## 3.1.0
|
||||
|
||||
* `Versions`:
|
||||
* `kotlin`: `1.7.21`
|
||||
* `microutils`: `0.14.1`
|
||||
* `tgbotapi`: `4.1.0`
|
||||
* `klock`: `3.4.0`
|
||||
* `uuid`: `0.6.0`
|
||||
|
||||
## 3.0.0
|
||||
|
||||
* `Versions`:
|
||||
* `microutils`: `0.14.0`
|
||||
* `tgbotapi`: `4.0.0`
|
||||
* `kslog`: `0.5.3`
|
||||
* `exposed`: `0.40.1`
|
||||
* `klock`: `3.3.1`
|
||||
|
||||
## 2.4.1
|
||||
|
||||
* `Versions`:
|
||||
* `microutils`: `0.13.2`
|
||||
* `tgbotapi`: `3.3.1`
|
||||
* `klock`: `3.3.0`
|
||||
* `ktor`: `2.1.3`
|
||||
* `koin`: `3.2.2`
|
||||
|
||||
## 2.4.0
|
||||
|
||||
* `Versions`:
|
||||
* `kotlin`: `1.7.20`
|
||||
* `serialization`: `1.4.1`
|
||||
* `tgbotapi`: `3.3.0`
|
||||
* `microutils`: `0.13.1`
|
||||
* `klock`: `3.2.0`
|
||||
* `ktor`: `2.1.2`
|
||||
|
||||
## 2.3.4
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `3.2.7`
|
||||
* `microutils`: `0.12.16`
|
||||
|
||||
## 2.3.3
|
||||
|
||||
* `Versions`:
|
||||
* `tgbotapi`: `3.2.6`
|
||||
* `sqlite`: `3.39.3.0`
|
||||
|
||||
## 2.3.2
|
||||
|
||||
* `Versions`:
|
||||
|
||||
@@ -49,14 +49,32 @@ publishing {
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
if (project.hasProperty('GITEA_TOKEN') || System.getenv('GITEA_TOKEN') != null) {
|
||||
maven {
|
||||
name = "Gitea"
|
||||
url = uri("https://git.inmo.dev/api/packages/InsanusMokrassar/maven")
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Authorization"
|
||||
value = project.hasProperty('GITEA_TOKEN') ? project.property('GITEA_TOKEN') : System.getenv('GITEA_TOKEN')
|
||||
}
|
||||
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot Bot","description":"Base PlaguBot project","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}},"type":"JVM"}
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot Bot","description":"Base PlaguBot project","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"Gitea","url":"https://git.inmo.dev/api/packages/InsanusMokrassar/maven","credsType":{"type":"dev.inmo.kmppscriptbuilder.core.models.MavenPublishingRepository.CredentialsType.HttpHeaderCredentials","headerName":"Authorization","headerValueProperty":"GITEA_TOKEN"}},{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}},"type":"JVM"}
|
||||
@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitText
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitTextMessage
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onCommand
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onUnhandledCommand
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
@@ -38,9 +38,9 @@ object HelloPlugin : Plugin {
|
||||
}
|
||||
|
||||
private sealed interface InternalFSMState : State {
|
||||
override val context: ChatId
|
||||
data class DidntSaidHello(override val context: ChatId) : InternalFSMState
|
||||
data class SaidHelloOnce(override val context: ChatId) : InternalFSMState
|
||||
override val context: IdChatIdentifier
|
||||
data class DidntSaidHello(override val context: IdChatIdentifier) : InternalFSMState
|
||||
data class SaidHelloOnce(override val context: IdChatIdentifier) : InternalFSMState
|
||||
}
|
||||
|
||||
override suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin) {
|
||||
|
||||
@@ -63,20 +63,18 @@ data class PlaguBot(
|
||||
}
|
||||
|
||||
override suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin) {
|
||||
config.plugins.map { plugin ->
|
||||
launch {
|
||||
runCatchingSafely {
|
||||
logger.i("Start loading of $plugin")
|
||||
with(plugin) {
|
||||
setupBotPlugin(koin)
|
||||
}
|
||||
}.onFailure { e ->
|
||||
logger.w("Unable to load bot part of $plugin", e)
|
||||
}.onSuccess {
|
||||
logger.i("Complete loading of $plugin")
|
||||
config.plugins.forEach { plugin ->
|
||||
runCatchingSafely {
|
||||
logger.i("Start loading of $plugin")
|
||||
with(plugin) {
|
||||
setupBotPlugin(koin)
|
||||
}
|
||||
}.onFailure { e ->
|
||||
logger.w("Unable to load bot part of $plugin", e)
|
||||
}.onSuccess {
|
||||
logger.i("Complete loading of $plugin")
|
||||
}
|
||||
}.joinAll()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@ allprojects {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url "https://git.inmo.dev/api/packages/InsanusMokrassar/maven" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@ kotlin.js.generate.externals=true
|
||||
kotlin.incremental=true
|
||||
|
||||
group=dev.inmo
|
||||
version=2.3.2
|
||||
version=4.0.0
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
[versions]
|
||||
|
||||
kt = "1.7.10"
|
||||
kt-serialization = "1.4.0"
|
||||
kt = "1.8.10"
|
||||
kt-serialization = "1.5.0"
|
||||
kt-coroutines = "1.6.4"
|
||||
|
||||
microutils = "0.12.13"
|
||||
tgbotapi = "3.2.3"
|
||||
kslog = "0.5.2"
|
||||
microutils = "0.17.0"
|
||||
tgbotapi = "6.0.0"
|
||||
kslog = "1.0.0"
|
||||
|
||||
jb-exposed = "0.39.2"
|
||||
jb-dokka = "1.7.10"
|
||||
jb-exposed = "0.41.1"
|
||||
jb-dokka = "1.7.20"
|
||||
|
||||
sqlite = "3.36.0.3"
|
||||
sqlite = "3.40.0.0"
|
||||
|
||||
klock = "3.1.0"
|
||||
uuid = "0.5.0"
|
||||
klock = "3.4.0"
|
||||
uuid = "0.7.0"
|
||||
|
||||
ktor = "2.1.1"
|
||||
ktor = "2.2.3"
|
||||
|
||||
gh-release = "2.4.1"
|
||||
|
||||
android-gradle = "7.2.2"
|
||||
dexcount = "3.1.0"
|
||||
koin = "3.2.0"
|
||||
koin = "3.3.2"
|
||||
|
||||
[libraries]
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -49,14 +49,32 @@ publishing {
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
if (project.hasProperty('GITEA_TOKEN') || System.getenv('GITEA_TOKEN') != null) {
|
||||
maven {
|
||||
name = "Gitea"
|
||||
url = uri("https://git.inmo.dev/api/packages/InsanusMokrassar/maven")
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Authorization"
|
||||
value = project.hasProperty('GITEA_TOKEN') ? project.property('GITEA_TOKEN') : System.getenv('GITEA_TOKEN')
|
||||
}
|
||||
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot Plugin","description":"Base dependency for whole PlaguBot project","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}},"type":"JVM"}
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot Plugin","description":"Base dependency for whole PlaguBot project","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"Gitea","url":"https://git.inmo.dev/api/packages/InsanusMokrassar/maven","credsType":{"type":"dev.inmo.kmppscriptbuilder.core.models.MavenPublishingRepository.CredentialsType.HttpHeaderCredentials","headerName":"Authorization","headerValueProperty":"GITEA_TOKEN"}},{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}},"type":"JVM"}
|
||||
Reference in New Issue
Block a user