Y
Y
Yura Mailler2021-03-15 17:11:09
API
Yura Mailler, 2021-03-15 17:11:09

How to find out the name of the product in the bot?

Hello ! Vopschem I have a product and when I click on the button to go to the seller, the user is thrown to the bot and I need the bot to be able to read the name of the product (when switching to the seller, a message with a purchase is sent and the product is attached to the message, and I need to find out the names of this product to send the necessary messages)
How to implement it? Or can it be done?
If something is not clear, write, I will rephrase

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex K, 2021-03-15
@alexk111

If a message arrives with a product attached, then you can do the following. Catching `incoming message` events . In the message object, we check in the `attachments` array for the presence of an object with `type = market`. This is a product object whose title is in the `title` property.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question