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

36 ответов

87 просмотров

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

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

ʀᷢɪͥɴᷡᴋⷦᴜͧ ᴅͩᴀⷽᴡᷱɴᷡ  ‌
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

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 🇷🇺
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

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

Карта сайта