Answer the question
In order to leave comments, you need to log in
How to make a VK bot ignore the user id that forbade sending him messages?
I have such code
elif "!Рассылка" in reseived_message:
for id in users:
user_id=id
write_messages_us(id, (re.sub(r'!Рассылка', " ", reseived_message)))
Answer the question
In order to leave comments, you need to log in
Do it in this way:
for id in users:
user_id=id
try:
write_messages_us(id, (re.sub(r'!Рассылка', " ", reseived_message)))
except Exception:
pass
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question