Finished shop system

This commit is contained in:
2017-10-05 13:48:16 +02:00
parent 71303ef351
commit a52668ada5
9 changed files with 127 additions and 11 deletions

View File

@ -16,19 +16,19 @@ 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)
// // TEST
// inventory.AddItem("anime-support-ticket", 50)
// inventory.AddItem("pro-account-24", 30)
err = arn.DB.Set("Inventory", inventory.UserID, inventory)