Improved inventory

This commit is contained in:
2017-10-05 09:39:37 +02:00
parent 77ae39d330
commit 09d28e146c
5 changed files with 69 additions and 15 deletions

View File

@ -16,15 +16,20 @@ func main() {
// Iterate over the stream
for user := range allUsers {
exists, err := arn.DB.Exists("Inventory", user.ID)
// exists, err := arn.DB.Exists("Inventory", user.ID)
if err != nil || exists {
continue
}
// if err != nil || exists {
// continue
// }
fmt.Println(user.Nick)
inventory := arn.NewInventory(user.ID)
// TEST
inventory.AddItem("anime-support-ticket", 50)
inventory.AddItem("pro-account-24", 30)
err = arn.DB.Set("Inventory", inventory.UserID, inventory)
if err != nil {