Hey everyone🌹🖐 Is there any way I can get the message_id

of available posts in a channel?
Just the available posts which means the posts haven't been deleted

4 ответов

14 просмотров

I know four ways: - Add the bot to the channel before sending the posts. You will get an update for every post. - resond to every existing post with another post. The original posts will be contained in the reply_to_message property of the post. - Create a userbot instead of a usual bot. - Copy all links to existing posts manually using a regular telegram client. The number at the end of the link is the id.

Behnam-Mohammadi Автор вопроса
Quad
I know four ways: - Add the bot to the channel bef...

Appreciate your help👍🌹 The problem with the solution 1, is that the channel has been posting for a long time before adding my bot to it, so basically way 1 is not possible and also about solution 4, the problem is the number of posts is too many to deal with them manually... But about the solution of using a user bot instead of an usual bot, can you please give me some more information? I don't think I know anything about it

Behnam Mohammadi
Appreciate your help👍🌹 The problem with the solut...

I don't know much either. But I know it can be done using TDLib. https://core.telegram.org/tdlib But I just had another idea: Maybe it is easier to guess the ids. They're sequential starting with 1. And you can get the current last id easily. So you could try to use copyMessage on every possible id an check, if it succeeds.

Behnam-Mohammadi Автор вопроса
Quad
I don't know much either. But I know it can be don...

Thanks, I'll check it out👍 About the second idea, I've done something similar to that and the problem with it is it takes too long, because it's simply iteration on about 5000 message_Ids which so many of them may not be available at all! You know the final goal is to delete the available posts fast enough. I've seen this being done very quickly in another bot, but I don't understand how it does it🤔 I can show you this ability of that bot of you're interested, but thanks again for your help🌹

Похожие вопросы

Обсуждают сегодня

Вопрос тем кто смотрит видео и слушает подкасты - как вы потом ищете нужную вам информацию? Вот статью я прочитал, потом могу искать нужную мне часть банальным поиском. Пропус...
Aleksandr Druzhinin
4
Мне были интересны дишные хаки и я нашёл любопытный способ на форуме через __traits, что-то вроде int delegate(int) fac = (int n) => n == 0 ? 1 : n * __traits(parent, {})(n - ...
Constantin F.
1
Мне интересно, скорее людей здесь используют D, Rust, C/C++ для решения реальных прикладных задач за деньги?)
Evil Satanson
49
Я думаю тему с тем, что “Google не продвигает свои технологии. Язык Го сам просто такой хороший» можно закрыть https://www.opennet.ru/opennews/art.shtml?num=61454
Serg Gini
5
И к какой архитектуре привязана Java?
Dmitry Olshansky
17
В общем. если я беру Ди при всех его проблемах, у меня возникает первая реальная задача. Сохранения к игре, гибкие сохранения. У нас нет легкого nosql хранилища, которое можно...
Vi
10
На работе пишем распределенное приложение, у которого сотни, если не тысячи настроек. Конфиги написаны на xml, расположены на разных хостах и должны быть согласованы друг с др...
Aleksandr Druzhinin
5
а сколько всего в IT умерло? Где флеш-игры, их было туча, где они все? Сегодня технология есть, а завтра вжух и мёртвая. Этот wasm сильно напоминает джавовские апплеты, silver...
Constantin F.
5
если их разбить, то может сработать, но это уже немного не то int delegate(int) fac; fac = (n) => n == 0 ? 1 : n * fac(n-1); writeln(fac(5)); //120
Constantin F.
1
опять 25. сколько ты написал серверов, где все упиралось в вайб? не хватало тебе быстродействия, клиенты уходили и прочее? вот прямо не хватало тебе 25К запросов в секунду?
Aleksandr Druzhinin
2
Карта сайта