Answer the question
In order to leave comments, you need to log in
How to make a referral system in telegram bot through SQlite database?
Good day!
I'm interested in how to catch the values in {} and write it to a variable (so that later I can find the right user in the database and write down that he has a referral)
I read the Deep linking and WebhookInfo manuals, they don't quite what I need, or I didn't understand
Many thanks in advance for your help!
ref_link = 'https://telegram.me/{}?start={}'
Answer the question
In order to leave comments, you need to log in
Hi
I think it's exactly what you need.
I will give an example
https://telegram.me/super_scam_bot?start=12345
In the first {} (in this case, super_scam_bot) is always the username of your bot, you set it up yourself.
Then, when a person presses the "Start" button, a message is sent to him "/start", but you get not just "/start", but "/start 12345", that is, the second {} from the link is stored here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question