mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2026-09-13 11:34:13 +00:00
update readmes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import dev.inmo.micro_utils.common.MPPFile
|
||||
import okio.FileSystem
|
||||
|
||||
/** Native picker backed by Okio, returning a file root directly or descending through random directory children. */
|
||||
actual fun pickFile(currentRoot: MPPFile): MPPFile? {
|
||||
if (FileSystem.SYSTEM.exists(currentRoot) && FileSystem.SYSTEM.listOrNull(currentRoot) == null) {
|
||||
return currentRoot
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import okio.Path.Companion.toPath
|
||||
|
||||
/** Kotlin/Native entry point; [args] contains the bot token followed by an optional picker root. */
|
||||
fun main(args: Array<String>) {
|
||||
runBlocking {
|
||||
doRandomFileSenderBot(args.first(), args.getOrNull(1) ?.toPath() ?: "".toPath())
|
||||
|
||||
Reference in New Issue
Block a user