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
@dp.message_handler(content_types=['photo'])
async def cmd(message):
if message.chat.type == "private":
# действие
else:
await message.reply("Пользуйтесь ботом в личных сообщениях!")
You can check by chat ID. If the user ID matches the chat ID, then this is a PM
async def echo(message):
if message.from_user.id == message.chat.id:
#что-то
else:
#что-то
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question