Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can store a list of messages in an array and, when sending, simply select a random element from this list.
Ready example for aiogram
import random as r
start_words = ["приветствую, ла ла ла", "доброго времени суток", "hello"] // значения
s_words = r.choice(start_words) // выбирает рандомно слова
@dp.message_handler(commands=['start', 'help'])
async def send_hello(message: types.Message):
await message.answer(s_words)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question