small update

This commit is contained in:
2020-08-24 00:41:24 +06:00
parent 09416a0ba0
commit 1c509ed8cd
2 changed files with 9 additions and 4 deletions

View File

@@ -23,14 +23,17 @@ suspend fun activateResenderBot(
bot.startGettingFlowsUpdatesByLongPolling {
filterContentMessages<MessageContent>(scope).onEach {
it.content.createResends(it.chat.id, replyToMessageId = it.messageId).forEach {
bot.executeUnsafe(it) ?.also {
bot.executeUnsafe(it) {
it.forEach(print)
} ?.also {
print(it)
}
}
}.launchIn(scope)
filterMediaGroupMessages<MediaGroupContent>(scope).onEach {
safely {
bot.executeUnsafe(it.createResend(it.chat ?: return@safely, replyTo = it.first().messageId)).also {
mediaGroupMessages(scope).onEach {
safely({ print(it.stackTraceToString()) }) {
println(it.chat)
bot.execute(it.createResend(it.chat ?: return@safely, replyTo = it.first().messageId)).also {
print(it)
}
}