Reputation: 5351
I'm developing a telegram bot which needs to store datas for each user. Is there a way to store them directly into the phone or something particular or the only way is to save them server-side and call them back for every call?
Thanks
Upvotes: 9
Views: 15314
Reputation: 331
Data storage handling can reside in the machine where the code telegram bot run. I developed telegram bot with node-telegram-bot-api. For data storage i used mongodb (if you are using NodeJS can follow this guide). If you will choose to use mongodb consider that you can use it with several frameworks/programming languages.
Upvotes: 1
Reputation: 797
I don't get what you want to do. A telegram bot is running on your server and does only reply or send messages to the user. When you want to save data for the user, you have to save it on the server. Assuming you are using C#, you could use a database or a simple Dictionary with the UserID as key and your data as the value. Your bot can't run any code on the phone, so there is no possibility to save data there.
Upvotes: 13