async def chekc_balance(self, user):
async with self.pool.acquire() as conn:
async with conn.cursor() as cur:
result = await cur.execute("SELECT * FROM profile WHERE uid=%s", user.id)
row = await cur.fetchall()
if result == 1:
await cur.execute("UPDATE profile SET balance=balance WHERE uid=%s", user.id)
return row['balance']
@command(name="кошелёк")
async def prov(self, ctx):
user = await self.bot.get_user(ctx.from_id)
balance = await basa.register.main.chekc_balance(user)
return await ctx.send(f"В кошельке: {balance}\n"
f"На карточке:\n")
Ошибка:
raise CommandInvokeError(exc) from exc vk_botting.exceptions.
CommandInvokeError:
Command raised an exception:
TypeError: tuple indices must be integers or slices, not str
Как исправить ошибку?