mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2025-09-16 13:59:26 +00:00
Add opportunity to use config in setup bot client
This commit is contained in:
@@ -42,9 +42,16 @@ data class PlaguBot(
|
||||
token = config.botToken,
|
||||
apiUrl = config.botApiServer
|
||||
) {
|
||||
setupBotClient()
|
||||
setupBotClient(json)
|
||||
}
|
||||
|
||||
override fun KtorRequestsExecutorBuilder.setupBotClient(params: JsonObject) {
|
||||
config.botPlugins.forEach {
|
||||
with(it) {
|
||||
setupBotClient(params)
|
||||
}
|
||||
}
|
||||
}
|
||||
override fun KtorRequestsExecutorBuilder.setupBotClient() {
|
||||
config.botPlugins.forEach {
|
||||
with(it) {
|
||||
|
Reference in New Issue
Block a user