A
A
Artur2020-06-02 13:03:42
Python
Artur, 2020-06-02 13:03:42

How to send a random word if the user writes the command /random?

The user will write the command:

/random a b c
then the bot will send a message with a random word

5ed6232a11521490333476.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2020-06-02
@SoreMix

Take all the words that the user has sent, make a list of them, call random.choice(), passing the list into it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question