Hi, is it better to connect via webhooks or mtproto?

36 ответов

33 просмотра

That's a weird question

Tancredi- Автор вопроса
Tancredi
Why?

It's like asking "is it better to construct with bricks or with hands?" Well not THAT different but still. Mtproto is a protocol, webhook is a method to receive updates

Tancredi- Автор вопроса

well anyway, if splitting question into two parts (mtproto or http and webhook or longpoll) - everything depends on your needs. Mtproto is a bit less limited. But its harder to work with and you will be able to trap yourself in some other limits that normally bot api handles. Using it and writing a bad quality code may also result into you getting banned (hehe) Https bot api is better in most cases. I usually use longpoll since I don't wanna open any endpoints for my bots, but there are cases when its horrible (like if you are making a bot constructor like @livegram or @manybot). Choose whatever you like here

s0m31 🇷🇺
well anyway, if splitting question into two parts ...

Because without testing or getting error you can't come up with a good quality code

ʀᷢɪͥɴᷡᴋⷦᴜͧ ᴅͩᴀⷽᴡᷱɴᷡ  ‌
Because without testing or getting error you can't...

Disagree. Good quality nowadays depends on a code itself a lot. 100 if elses in a row is not a good code

by that I mean the code that flood the heck out of telegram

ʀᷢɪͥɴᷡᴋⷦᴜͧ ᴅͩᴀⷽᴡᷱɴᷡ  ‌
Means making continuous requests to api

kind of. Your function may just be not very optimal. Ofc i am not talking about just while(true) {flood()}

ʀᷢɪͥɴᷡᴋⷦᴜͧ ᴅͩᴀⷽᴡᷱɴᷡ  ‌
Optimal?

I can't come up with a good example right ahead. But lets just say that it takes 10 requests when it can take 7

ʀᷢɪͥɴᷡᴋⷦᴜͧ ᴅͩᴀⷽᴡᷱɴᷡ  ‌
So 3 requests took place because of error and tele...

if this function was called 2 times, its 6 already. Thats what i am trying to tell you. I am too lazy to write a giant post of why it may result into this

ʀᷢɪͥɴᷡᴋⷦᴜͧ ᴅͩᴀⷽᴡᷱɴᷡ  ‌
So 3 requests took place because of error and tele...

yesterday telegram started banning users for sending openmessage links. God knows why

s0m31 🇷🇺
if this function was called 2 times, its 6 already...

A code become giants once you recieve and then you start adding one one conditions to make it error free

s0m31 🇷🇺
bot api is simplifying stuff, thats it

Atleast add bot to join vc and speak and allow 2gb upload and download

s0m31 🇷🇺
because you wont dig into this stuff

Even I wanted a mt-proto lib but now after hearing this ban news who would even try

s0m31 🇷🇺
me

Good try I don't have multiple accounts to try

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

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

Эх кто-то пришел и весь праздник испортил :( 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
на D можно построить абсолютно разный архитект, как объектный, так и нет, оч широкий простор для принятия решений. Однако проблема в том, что большинство книг об айтишной архи...
Constantin_FV
1
ну кстати в ноду 22 завезли движок 12.4 с WasmGC. А как у нас дела с wasm, мб в дискорде что-то кто-то писал-отвечал? Из BetterC, конечно, тоже можно выжать что-нибудь, но хот...
Constantin_FV
1
День добрый. Стандартная библиотека phobos (std.array) ссылается на внешнюю фунцию _d_newarrayUTrace и при сборке с ключом profile-gc эта ссылка остаётся неопределённой. Никак...
slacker linuxoid
5
а у нас кто-нибудь разбирается в матлаб? Накопал статью по замощению Фодерберга, о нём вообще мало инфы в сети. Но там матлабовский код, который нужно через песочницу по сути ...
Constantin_FV
1
а что на D можно делать под 3й Godot ?
Dmitry Ponyatov
3
ну эт я в вове такой, а тут я... на расте надо писать, на д куча проблем, годот тоже не лапочка. сидишь в афиге, а я еще бросил курить... и думаешь, а почему Я? хд.
Vi
1
string xczhojoxueaflfhhygcc ="xczhojoxueaflfhhygcc"; long xczhojoxueaflfhhygcc_2 =1368962155; import std.conv: text; writeln(text(xczhojoxueaflfhhygcc, " ", xczhojoxueaflfhhyg...
Constantin_FV
6
Доброго времени суток. Сейчас я работаю над своей архитектурой Component / Systems. Если просто, это то что использовали до дробления на ECS. Потому что ECS это все таки нишев...
Vi
26
А кто-нибудь встречал в пакетах\графических движках генерацию мозаик, Пенроуз и т.п.? На гитхабе вижу около сотни репов, ток по Пенроузу + разбросаны сниппеты по сети, но мб г...
Constantin_FV
3
Карта сайта