Okay so im making an inventory command for my currency sys but im stuck with it. How should i exactly define that if user has nothing in his inv?
My code:
bag = users[str(user.id)]["bag"] # This is just the json where the items are stored.
for item in bag:
name = item["item"]
amount = item["amount"]
if name in bag == None:
em.add_field(name="Your bag is empty.")
else:
em.add_field(name=name,value=amount)
await ctx.send(embed=em)
Traceback: No errors in console, it simply does not work.