@bot.command()
async def test(ctx):
products = collection.find_one({"_id": ctx.author.id})["products"]
if products == None:
msg = "Пусто"
else:
msg = products
await ctx.send("Продукты:", msg)
if products == None:
msg = "Пусто"
if not products:
msg = "Пусто"