E
E
enotov322020-04-26 21:48:46
Python
enotov32, 2020-04-26 21:48:46

Python How to make DB for VK-bot?

I want a db on sqlite 3, I need the first message of a subscriber to be loaded into the database with his registration date, and when the profile command is written to him, how to do it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Karbivnichy, 2020-04-26
@enotov32

Either show the code and what is not working for you, or:
1) Register on the freelance exchange;
2) We throw money there;
3) We find the artist;
4) PROFIT!
And the DB is correct, not the DB.

V
Vladislav the Wise, 2020-04-26
@yungtitanium

PostgreSQL will be better, otherwise smart people will demolish your database

I
Ivan Lee, 2020-04-27
@appliks

Support Sergei.
If you rummage at least a little, you should understand:
1) When you receive the "message_new" request, an id comes in the array, you get it.
2) There is an unofficial foaf method (I was looking for it in api two years ago, it wasn’t there, now MB has been added), it returns user data in an xml file, you can find the date there (" http://vk.com/foaf.php?id= {user_id} ").
3) You add the date to the database, there are many articles on the Internet on how to do this in python.
4) When receiving the "profile" command, the bot must make a request to the database and send the data to the user.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question