add files loader bot

This commit is contained in:
2020-08-23 21:52:13 +06:00
parent 426f8ffc61
commit c2788224e7
6 changed files with 78 additions and 6 deletions

View File

@@ -30,11 +30,7 @@ suspend fun activateResenderBot(
}.launchIn(scope)
filterMediaGroupMessages<MediaGroupContent>(scope).onEach {
safely {
bot.sendMediaGroup(
it.first().chat,
it.map { it.content.toMediaGroupMemberInputMedia() },
replyToMessageId = it.first().messageId
).also {
bot.executeUnsafe(it.createResend(it.chat ?: return@safely, replyTo = it.first().messageId)).also {
print(it)
}
}