D
D
Duzive2019-09-26 01:22:09
Python
Duzive, 2019-09-26 01:22:09

How to make user input?

Hello) I
wrote a function to send a message to the administration. For feedback. But I can't get user input. The bot just goes straight to sending. How to fix it? Displayed with the help of print the resulting event.text produced the text of the button. How can this be fixed?
Here is the function code:

def helps_part2():
  print("Зашли в парт2")
  if event.type == VkEventType.MESSAGE_NEW:
    print("отправили сообщение главному")
    print(event.text)
    vk.method("messages.send", {'user_id': str(282952551), 'message': "Поступил вопрос от [" + str(event.user_id) + "|пользователя]" + "\n\n" + "Его текст: " + event.text, 'random_id': 0})
    print("отправлено")
    vk.method("messages.send", {'user_id': event.user_id, 'message': "Вопрос успешно отправлен тренеру. Он ответит в ближайшее время.", 'random_id': 0})

I hope for your help.

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