Ask coding questions

← Back to all posts
How can i "save" wat happened when i use the command
Pokedric

Lets take "Dank memer" for example. I want the bot to remember what i have and what i did. Example: What the bot said, and for example i got 1 fish when i used the command, I want the bot to know that i have 1 fish when i use the command again.
(If you don't understand i dont blame you)

Answered by OldWizard209 [earned 5 cycles]
View Answer
Voters
Pokedric
Comments
hotnewtop
OldWizard209

You will need to use replit's database. The databse works with key-value pairs. But because your user will have more than one thing in his inventory, you can pass in a list or dicitonary.:

So no matter how many times the bot is restarted, replit's database will save the data.

Pokedric

@OldWizard209 Thanks so much!

OldWizard209

np, would mind marking the answer as correct then? @Pokedric

Pokedric

@OldWizard209 yes, done