-
Notifications
You must be signed in to change notification settings - Fork 30
changeChatMemberStatus
Changes status of the chat member, need appropriate privileges.
changeChatMemberStatus(chat_id, user_id, status)
In channel chats, user will be added to chat members if he is yet not a member and there is less than 200 members in the channel.
Status will not be changed until chat state will be synchronized with the server.
Status will not be changed if application is killed before it can send request to the server.
Option | Description |
---|---|
chat_id |
Chat identifier. |
user_id |
Identifier of the user to edit status, bots can be editors in the channel chats. |
status |
New status of the member in the chat. The status are Creator , Editor , Moderator , Member , Left , and Kicked . |
-
133780085
is creator of the chat, can delete any message, kick any user and add editors and moderators in channels.changeChatMemberStatus(1234567890, 133780085, 'Creator')
-
In broadcast channels,
133780085
can post messages to the broadcast channel and have moderator rights. In groups and supergroups,133780085
can add new members to the chat/kick unpriviledged members.changeChatMemberStatus(1234567890, 133780085, 'Editor')
-
Only for channels,
133780085
can delete messages of unprivileged members and kick them.changeChatMemberStatus(1234567890, 133780085, 'Moderator')
-
User
133780085
is a member of1234567890
, but have no any additional privileges.changeChatMemberStatus(1234567890, 133780085, 'Member')
-
133780085
is not a1234567890
member.changeChatMemberStatus(1234567890, 133780085, 'Left')
-
133780085
was kicked from the1234567890
(and obviously is not a1234567890
member).changeChatMemberStatus(1234567890, 133780085, 'Kicked')
Test script
Frequently Asked Questions
The Functions
- getAuthState
- setAuthPhoneNumber
- resendAuthCode
- checkAuthCode
- checkAuthPassword
- requestAuthPasswordRecovery
- recoverAuthPassword
- resetAuth
- checkAuthBotToken
- getPasswordState
- setPassword
- getRecoveryEmail
- setRecoveryEmail
- requestPasswordRecovery
- recoverPassword
- getMe
- getUser
- getUserFull
- getGroup
- getGroupFull
- getChannel
- getChannelFull
- getSecretChat
- getChat
- getMessage
- getMessages
- getFile
- getFilePersistent
- getChats
- searchPublicChat
- searchPublicChats
- searchChats
- addRecentlyFoundChat
- deleteRecentlyFoundChat
- deleteRecentlyFoundChats
- getCommonChats
- getChatHistory
- deleteChatHistory
- searchChatMessages
- searchMessages
- sendBotStartMessage
- sendInlineQueryResultMessage
- forwardMessages
- sendChatSetTtlMessage
- deleteMessages
- deleteMessagesFromUser
- editMessageText
- editMessageCaption
- editMessageReplyMarkup
- editInlineMessageText
- editInlineMessageCaption
- editInlineMessageReplyMarkup
- getInlineQueryResults
- answerInlineQuery
- getCallbackQueryAnswer
- answerCallbackQuery
- setGameScore
- setInlineGameScore
- getGameHighScores
- getInlineGameHighScores
- deleteChatReplyMarkup
- sendChatAction
- sendChatScreenshotTakenNotification
- openChat
- closeChat
- viewMessages
- openMessageContent
- createPrivateChat
- createGroupChat
- createChannelChat
- createSecretChat
- createNewGroupChat
- createNewChannelChat
- createNewSecretChat
- migrateGroupChatToChannelChat
- changeChatTitle
- changeChatPhoto
- changeChatDraftMessage
- addChatMember
- addChatMembers
- changeChatMemberStatus
- getChatMember
- downloadFile
- cancelDownloadFile
- setFileGenerationProgress
- finishFileGeneration
- exportChatInviteLink
- checkChatInviteLink
- importChatInviteLink
- blockUser
- unblockUser
- getBlockedUsers
- importContacts
- searchContacts
- deleteContacts
- getUserProfilePhotos
- getStickers
- getStickerSets
- getArchivedStickerSets
- getTrendingStickerSets
- getAttachedStickerSets
- getStickerSet
- searchStickerSet
- updateStickerSet
- viewTrendingStickerSets
- reorderStickerSets
- getRecentStickers
- addRecentSticker
- deleteRecentSticker
- clearRecentStickers
- getStickerEmojis
- getSavedAnimations
- addSavedAnimation
- deleteSavedAnimation
- getRecentInlineBots
- getWebPagePreview
- getNotificationSettings
- setNotificationSettings
- resetAllNotificationSettings
- setProfilePhoto
- deleteProfilePhoto
- changeName
- changeAbout
- changeUsername
- changePhoneNumber
- resendChangePhoneNumberCode
- checkChangePhoneNumberCode
- getActiveSessions
- terminateSession
- terminateAllOtherSessions
- toggleGroupEditors
- changeChannelUsername
- toggleChannelInvites
- toggleChannelSignMessages
- changeChannelAbout
- pinChannelMessage
- unpinChannelMessage
- reportChannelSpam
- getChannelMembers
- deleteChannel
- getCreatedPublicChannels
- closeSecretChat
- getSupportUser
- getWallpapers
- registerDevice
- getDeviceTokens
- setPrivacy
- getPrivacy
- getOption
- setOption
- changeAccountTtl
- getAccountTtl
- deleteAccount
- getChatReportSpamState
- changeChatReportSpamState
- setBotUpdatesStatus
- setAlarm
- sendText
- sendAnimation
- sendAudio
- sendDocument
- sendPhoto
- sendSticker
- sendVideo
- sendVoice
- sendLocation
- sendVenue
- sendContact
- sendGame
- sendForwarded