kt-telegram-bot
kt-telegram-bot copied to clipboard
Telegram Bot Library for Kotlin language
I'm trying to test my logic. I wanted to make Mockito `spy(Bot.createPolling(...))` and then call `TelegramBot#onUpdate` method to simulate incoming Telegram update, but `TelegramBot` and all along classes are internal...
I needed to poll only last message after restart, so added this
- Faced the following problem: `Multiple sealed subclasses of 'class com.elbekd.bot.types.InlineQueryResult' have the same serial name 'photo': 'class com.elbekd.bot.types.InlineQueryResultPhoto', 'class com.elbekd.bot.types.InlineQueryResultCachedPhoto'` Moreover, these `InlineQueryResult` classes don't need `deserialize` methods and...
Now in order to support changes in API it is necessary to do eye-parsing of changes and then write additional code. It is manual, time consuming and error prone activity....
InlineKeyboardButton is not working. I'm getting `Bad Request: BUTTON_TYPE_INVALID` from telegram tested on `sendMessage()`
Getting exception when using Spring: ``` java.lang.NoClassDefFoundError: org/eclipse/jetty/webapp/WebAppContext at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at org.springframework.boot.web.embedded.jetty.JettyWebServer.handleDeferredInitialize(JettyWebServer.java:216) at...
Parsing InlineKeyboardMarkup object by kotlinx.serialization.json.Json causes SerializationException
I noticed that parsing `InlineKeyboardMarkup` object by `kotlinx.serialization.json.Json` causes `SerializationException`. Crash log: ``` Unknown exception: kotlinx.serialization.SerializationException: Serializer for class 'Any' is not found. Mark the class as @Serializable or provide...
Hi, I have a byte array with content and would like to send it as a file without saving it anywhere on a file system. Could you please provide an...
`bot.setChatMenuButton(chat.id, MenuButton.Commands("commands"))` leads to ``` java.lang.IllegalStateException: Sealed class 'commands' cannot be serialized as base class 'com.elbekd.bot.types.MenuButton' because it has property name that conflicts with JSON class discriminator 'type'. You can...
Thank you for the library. I faced a problem with chains. For example, I cannot run multiple bots with chain command '/create_order'. Method onCommand works fine for all bots, but...