How to make a bot in conversation VK replied to different messages?

How to make a bot replied to different messages on the same question?


- Who am I
- Cat-astronaut

- Who am I
Dog on earth
April 19th 20 at 12:45
2 answers
April 19th 20 at 12:47
Found the solution:

Create a list of different phrases/words:

list = ['Strawberry cocktail', 'cat-cosmonaut'] (And so on).

To use the library 'RANDOM':

vk.method("messages.send", {"peer_id": id, "message": random.choice(list), "random_id": random.randint(1, 2147483647)})
April 19th 20 at 12:49
I suggest to look in the direction of neural networks. it is possible to make a link to some sort of andexamine or train your colab on google

Find more questions by tags Python