-
-
Notifications
You must be signed in to change notification settings - Fork 17
F.A.Q
To get a response and be able to operate over, you need to use sendReturning at the end of the method instead of send.
In this case the Response class is returned, which contains the response, success or failure, further you need to either handle the failure or just call getOrNull().
There's section about: Processing responses.
This happens because spring-boot-devtools has its own classloader and it does not find methods.
You need to add to resources/META-INF/spring-devtools.properties:
restart.include.generated=/eu.vendeliIf you want to change the engine used by the client you can simply change the parameter in the plugin settings.
The library uses slf4j-api and to use the provider you need you just need to add it to the dependencies.
The library plugin automatically detects the use of the provider, if it is missing, logback will be used by default.
For example if you have an unstable connection and need to catch an error because of this, perhaps this approach will help you:
fun main() {
val bot = TelegramBot("TOKEN")
try {
bot.handleUpdates()
} catch (e: Exception) {
// handle if needed
bot.update.stopListener()
bot.handleUpdates()
}
}Also you can take a look how it's done in spring-starter.
Telegram bot Wiki © KtGram