We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChatAdministratorRights
You need to have four different Telegram clients:
You need a Telegram bot (either use an existing one or create a new one via BotFather).
You need a non-private group to which the Telegram bot has not been added yet.
Obtain the bot token {botId:botToken} from BotFather and the link https://t.me/{SomeBot}.
{botId:botToken}
https://t.me/{SomeBot}
Call the setMyDefaultAdministratorRights method via the Bot API, setting all 15 rights to false:
setMyDefaultAdministratorRights
false
curl -X POST 'https://api.telegram.org/bot{botId:botToken}/setMyDefaultAdministratorRights' \ -H 'Content-Type: application/json' \ -d '{"rights":{"can_change_info":false,"can_delete_messages":false,"can_delete_stories":false,"can_edit_messages":false,"can_edit_stories":false,"can_invite_users":false,"can_manage_chat":false,"can_manage_topics":false,"can_manage_video_chats":false,"can_pin_messages":false,"can_post_messages":false,"can_post_stories":false,"can_promote_members":false,"can_restrict_members":false,"is_anonymous":false}}'
Expected response: {"ok":true,"result":true}
{"ok":true,"result":true}
Verify the rights by calling getMyDefaultAdministratorRights:
getMyDefaultAdministratorRights
curl -X GET 'https://api.telegram.org/bot{botId:botToken}/getMyDefaultAdministratorRights'
Expected response:
{ "ok": true, "result": { "can_manage_chat": false, "can_change_info": false, "can_delete_messages": false, "can_invite_users": false, "can_restrict_members": false, "can_pin_messages": false, "can_manage_topics": false, "can_promote_members": false, "can_manage_video_chats": false, "can_post_stories": false, "can_edit_stories": false, "can_delete_stories": false, "is_anonymous": false } }
Note: You see 13 rights set to false. The can_post_messages and can_edit_messages rights apply only to channels, so their absence here is expected.
can_post_messages
can_edit_messages
Open the link to add the bot to the group (as indicated in the official documentation): https://t.me/{SomeBot}?startgroup=1
https://t.me/{SomeBot}?startgroup=1
In the window that appears, select the group to which the bot has not been added before.
One of two outcomes is expected:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prerequisites
You need to have four different Telegram clients:
You need a Telegram bot (either use an existing one or create a new one via BotFather).
You need a non-private group to which the Telegram bot has not been added yet.
Steps to Reproduce
Obtain the bot token
{botId:botToken}
from BotFather and the linkhttps://t.me/{SomeBot}
.Call the
setMyDefaultAdministratorRights
method via the Bot API, setting all 15 rights tofalse
:Expected response:
{"ok":true,"result":true}
Verify the rights by calling
getMyDefaultAdministratorRights
:curl -X GET 'https://api.telegram.org/bot{botId:botToken}/getMyDefaultAdministratorRights'
Expected response:
Note: You see 13 rights set to
false
. Thecan_post_messages
andcan_edit_messages
rights apply only to channels, so their absence here is expected.Open the link to add the bot to the group (as indicated in the official documentation):
https://t.me/{SomeBot}?startgroup=1
In the window that appears, select the group to which the bot has not been added before.
Expected Behavior
One of two outcomes is expected:
toggle).
Actual Behavior
The text was updated successfully, but these errors were encountered: