S
S
sergeyfilippov42019-07-25 15:07:09
Python
sergeyfilippov4, 2019-07-25 15:07:09

How to check if a conversation is admin?

I want to check for a conversation admin. That is: for the action to be performed, the user must be the administrator of the conversation

if 'хкик' in event.text.lower():
                nkick_id = event.text[5:]
                nkd = nkick_id.split('|')[0]
                kick_id = re.findall(r'id(.*)', nkd)[0]
                if kick_id == '552200476':
                    vk.messages.send(chat_id=event.chat_id,message='А хрен тебе!',random_id=0,reply_to=event.message_id)
                    break
                vk.messages.removeChatUser(user_id=kick_id,chat_id=event.chat_id)
                vk.messages.send(chat_id=event.chat_id, message=kicked, random_id=0, reply_to=event.message_id)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question