0

I am working on telegram bot where i want to store some variable in user's phone memory similar to shared preferences in android. I am using nodejs language to create telegram bot. Kindly help me how to implement that.

Thanks

  • 1
    I find the solution: Its actually impossible. Bots don't have access to users' devices. Store that data on your server, preferably in some database. Use Redis for storing it in cache if latency issue arises in database. – Abhishek Dixit Aug 16 '17 at 08:26

2 Answers2

1

You Can't do that.
But for storing Data for every user, You can store it in Your Data Base and Set User's Telegram User ID for Primary Key field. Its Safe And Easy to Use.

PurTahan
  • 789
  • 8
  • 24
0

Impossible. Bots don't have access to users' devices. Store that data on your server, preferably in some database. just use user id as key / part of the key / field, depending on db of your choice. You can use nedb or for more users GOOGLE FIREBASE

Saeed Heidarizarei
  • 8,406
  • 21
  • 60
  • 103