So they are using bot token like user token?

16 ответов

28 просмотров

I mean, you can login via bot tokens since, well always I guess. That's no secret. I was just very sure that it wasn't able to fetch all the chats for bot accounts with mtproto either - because I tried about 4 months ago.

Яico X
I mean, you can login via bot tokens since, well a...

Telethon throws this error message when trying to call await bot.get_dialogs() on a bot account: telethon.errors.rpcerrorlist.BotMethodInvalidError: The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot (caused by GetDialogsRequest)

Яico X
Telethon throws this error message when trying to ...

Maybe target an earlier layer, is that possible

Poolitzer X
Maybe target an earlier layer, is that possible

Arabic people seem to love php. So I am going to assume they wrote this bot in php. Checking MadelineProto it seems like they implemented a special "getDialogs" function, because the mtproto one is not usable for bot api accounts.

Яico X
Arabic people seem to love php. So I am going to a...

This seems to be their way of fetching all chats for bot api accounts: https://cs.github.com/danog/MadelineProto/blob/2e0d70bdc87d60a88022432d77a1a49e48168714/src/danog/MadelineProto/Wrappers/DialogHandler.php?q=getFullDialogs#L41-L56

Яico X
screenshot This seems to be their way of fetching all chats f...

Aha, so get_dialogs() doesnt work, but MP somehow gets a Chats iterator

Poolitzer X
Aha, so get_dialogs() doesnt work, but MP somehow ...

Yeah. But it seems like this uses some database stored data... weird.

Яico X
screenshot This seems to be their way of fetching all chats f...

@painor @twitface @SitiSchu you would be my go to MTProto creaks, you have any idea? The thread isn't too long, like 5 messages up.

painor
(where does the thread start?)

https://t.me/BotTalk/665906

painor
(where does the thread start?)

tl;dr There is a bot that takes a bot token as input and returns the number of chats/users that bot had in the past. We are trying to find out how it works. Telethon calls an mtproto method that returns BOT_METHOD_INVALID when we try to fetch all dialogs.

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

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

Ля, у меня иногда коробление такое, когда ищу, например, пачку библиотек для питона какого-нибудь - а там половина на плюсах, половина на расте-го-зиге, притом это не проблема...
Snusmumriken
1
Эх кто-то пришел и весь праздник испортил :( You need complex FBX scene importing setup to change things on import? good luck with that. You need navigation and pathfinding? g...
Serg Gini
5
я немного улучшил код, теперь такая картинка #0 0x0000000000000000 in ?? () #1 0x00007ffff7eba5bd in ?? () from /usr/lib/libraylib.so.450 #2 0x00007ffff7ed2990 in ?? () fro...
quantumde1 Зубенко
1
Доброго времени суток. Сейчас я работаю над своей архитектурой Component / Systems. Если просто, это то что использовали до дробления на ECS. Потому что ECS это все таки нишев...
Vi
26
а как заказывать под глобальные буфера неинициализированную память? например если захочу M[] бахнуть побольше, но не занимать статически инициализированный объём в .wasm
Dmitry Ponyatov
2
А какой самый кросс-платформенный сейчас? Для простой 2Д пошаговой/мультиплеерной штуки допустим? Desktop/android/iOS/web/steam deck/vita/switch? Один кандидат Hipreme А rayl...
Serg Gini
2
Для меня наследование это просто удобство ради удобства. Без множественного наследования, это бесполезная вещь, но удобная. С множественным наследованием, это опасная, но мощн...
Vi
1
есть спецы по гитлабу? нужно решить проблему того, что гитлаб не показывает файлы с расширением txt в артефактах и предлагает их скачать и смотреть локально. а это неудобно. в...
Aleksandr Druzhinin
1
string xczhojoxueaflfhhygcc ="xczhojoxueaflfhhygcc"; long xczhojoxueaflfhhygcc_2 =1368962155; import std.conv: text; writeln(text(xczhojoxueaflfhhygcc, " ", xczhojoxueaflfhhyg...
Constantin_FV
6
День добрый. Стандартная библиотека phobos (std.array) ссылается на внешнюю фунцию _d_newarrayUTrace и при сборке с ключом profile-gc эта ссылка остаётся неопределённой. Никак...
slacker linuxoid
5
Карта сайта