Сделал код для экономики:
База данных Mongodb, без коги.
Вот сам код:
@bot.command(aliases = ["bal"])
async def balance(ctx, member: discord.Member = None):
if not member:
member = ctx.author
balancik = Economy.find_one({"user_id": member.id, "server_id": ctx.guild.id})["balance"]
bank = Economy.find_one({"user_id": member.id, "server_id": ctx.guild.id})["bank"]
if member == None:
member = ctx.author
economy_embed = discord.Embed(
color = bot_color,
title = f"Баланс - {member.name}",
description = f"**На руках:** {balancik}\n**В банке:** {bank}\n**Общий баланс:** {balancik + bank}"
)
await ctx.send(embed = economy_embed)