#How to resolve this?
1 messages · Page 1 of 1 (latest)
wdym
It also didn't work
Send ur code
AttributeError: 'TextChannel' object has no attribute 'respond'
The code is
@bot.slash_command() async def balance(ctx, user: discord.User = None): if user != None: userid = user.id else: userid = ctx.author.id with open("users.json", "r+") as f: data = json.load(f) if str(userid) in data: balance = data[str(userid)]["balance"] await ctx.channel.respond( f"{ctx.author.mention} has **⏣{balance}** in their wallet." )
use
ctx.respond
not
ctx.channel.respond
ok thanks