M
M
MarkBelousov5672021-05-22 18:27:44
Python
MarkBelousov567, 2021-05-22 18:27:44

How to make it so that when one user writes a message to the bot, he sends a message to the creator?

I am using aiogram.

@dp.message_handler(content_types=['text'])
async def main(message : types.Message):
elif message.text == 'Oleg':
item1 = KeyboardButton('Go')
item2 = KeyboardButton('Not Go' )
markup=ReplyKeyboardMarkup(resize_keyboard=True).add(item1, item2)
await message.reply('Bro, go for a walk!', reply_markup=markup)

And for the bot to send me a message if the answer is "go".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
UberPool, 2021-05-22
@UberPool

Replace the user id with your own.
Example:

await bot.send_message(ваш телеграмм id, 'сообщение')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question