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 either change class discriminator in JsonConfiguration, rename property with @SerialName annotation or fall back to array polymorphism
...
at com.elbekd.bot.model.internal.SetChatMenuButton.write$Self(chat.kt:9)
at com.elbekd.bot.model.internal.SetChatMenuButton$$serializer.serialize(chat.kt:9)
at com.elbekd.bot.model.internal.SetChatMenuButton$$serializer.serialize(chat.kt:9)
at kotlinx.serialization.json.internal.StreamingJsonEncoder.encodeSerializableValue(StreamingJsonEncoder.kt:224)
...
at com.elbekd.bot.internal.TelegramClient.setChatMenuButton(TelegramClient.kt:2463)
at com.elbekd.bot.internal.TelegramBot.setChatMenuButton$suspendImpl(TelegramBot.kt:600)
at com.elbekd.bot.internal.TelegramBot.setChatMenuButton(TelegramBot.kt)
...
at com.elbekd.bot.internal.UpdateHandler.handle$library(UpdateHandler.kt:167)
at com.elbekd.bot.internal.TelegramBot.onUpdate(TelegramBot.kt:41)
at com.elbekd.bot.internal.LongPollingBot.poll(LongPollingBot.kt:44)
at com.elbekd.bot.internal.LongPollingBot.access$poll(LongPollingBot.kt:7)
bot.setChatMenuButton(chat.id, MenuButton.Commands("commands"))
leads to