tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

can bot assigned can_manage_topics permission pin/close topic? #2292

Closed Yxue-1906 closed 1 year ago

Yxue-1906 commented 1 year ago

I found method toggleForumTopicIsPinned/toggleForumTopicIsClosed, but as for the former, It returns error "The method is not available to bots"

Yxue-1906 commented 1 year ago

Also I encountered a problem, there is, I create a bot help me login a user account on my server; the workflow is, I send phone number to the bot, then the auth code, then the pass if exist; problem occurred in the second step, if the account chatting with the bot and the account to login to server are the same, it will stuck in sending message after receiving auth code from Telegram Service Account. I tried tg_cli to send the auth code to bot and the same issue occurred. From log I found the send message query kept receiving FLOOD_WAIT_0 error

Yxue-1906 commented 1 year ago

Also I encountered a problem, there is, I create a bot help me login a user account on my server; the workflow is, I send phone number to the bot, then the auth code, then the pass if exist; problem occurred in the second step, if the account chatting with the bot and the account to login to server are the same, it will stuck in sending message after receiving auth code from Telegram Service Account. I tried tg_cli to send the auth code to bot and the same issue occurred. From log I found the send message query kept receiving FLOOD_WAIT_0 error

image

Yxue-1906 commented 1 year ago

sometimes I can send out the auth code, but it would receive PHONE CODE EXPIRED error; resend code would encounter code can't resend error;

Yxue-1906 commented 1 year ago

@levlam would you please pay some time looking into this issue?

levlam commented 1 year ago

The method toggleForumTopicIsPinned is not available to bots. The method toggleForumTopicIsClosed can be used by bots.

I don't know, what can cause FLOOD_WAIT_0.

Yxue-1906 commented 1 year ago

The method toggleForumTopicIsPinned is not available to bots. The method toggleForumTopicIsClosed can be used by bots.

Will the restriction on bot pinning topic be loosen in the future?

I don't know, what can cause FLOOD_WAIT_0.

It occurs on both production and test server, no matter tg_cli or official telegram desktop version on linux; it seems like account is restricted on the server side.

levlam commented 1 year ago

Will the restriction on bot pinning topic be loosen in the future?

Noone knows.

Yxue-1906 commented 1 year ago

well, thx for your answers. I will close this issue.