Answer the question
In order to leave comments, you need to log in
How to make the bot work only for certain people?
I do it like this, but as a result, import vk_api
from vk_api.longpoll import VkLongPoll
from vk_api.longpoll import VkLongPoll, VkEventType
import requests, random, datetime, sys, time, argparse, os
from colorama import Fore, Back,
does not work for more than one person Style
token = "token"
session = vk_api.VkApi(token=token)
longpoll = VkLongPoll(session)
vk = session.get_api()
for event in longpoll.listen():
if event.from_chat:
try:
_phone1 = event.text .lower()
textt = event.text
user = event.user_id
except:
continue
if event.user_id != user:
continue
Answer the question
In order to leave comments, you need to log in
Please format your code before asking a question.
if event.user_id not in user:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question