Answer the question
In order to leave comments, you need to log in
How to make the bot respond with random phrases?
Hello, I need the bot to respond with a random phrase to a message.
Tell me how to do it.
Answer the question
In order to leave comments, you need to log in
You need to store these phrases
somewhere. For example, in an array
and thus mono output these random phrases
import random
my_list = ['hello', 'good', 'I dont know', 'Maybe']
result = random.choice(my_list)
print(result)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question