P
function( {
code
}, {
code
}, {
code
} )
Size: a a a
P
P
P
SS
fun main(args: Array<String>) {
val bot = bot {
token = "YOUR_API_KEY"
dispatch {
command("start") { bot, update->
val result = bot.sendMessage(chatId = update.message!!.chat.id, text = "Hi there!")
result.fold({
// do something here with the response
},{
// do something with the error
})
}
}
}
bot.startPolling()
}
SS
SS
result.fold({
// do something here with the response
},{
// do something with the error
})
P
SS
SS
@bot.handle_message(func=is_admin)
def admin_messages_handler(message: Message):
# code
P
P
SS
P
P
P
P
P
B[
SS