Ask coding questions

← Back to all posts
Help me on this database problem
Pokedric (0)

from replit import db

username = "{ctx.author.name}"
db["{ctx.author.name}"] = "iron","gold"

@bot.command(name="ironbal")
async def ironbal(ctx: commands.Context):
await ctx.send(f"You have db["(username)"]")

It doesn't send it. The part: "]") has a red line below. How do i fix this?

Comments
hotnewtop
MrVoo (190)

Your description makes zero sense, but you need to change the quotes around redstone and lapis on line 56 to single quotes