#Help Please!

1 messages · Page 1 of 1 (latest)

young thicket
#
@bot.slash_command(name="userinfo", description="View your information", guild_ids=guild_id)
async def userinfo(ctx):
    embed = discord.Embed(
        title="Userinfo",
        description=f"Name: {ctx.author.name}\n Id: {ctx.author.id}",
        color=discord.Color.random()
    )
    await ctx.respond(embed=embed)

Hi, I want to add an input that receives a name with someone's # on the discord server or by id and get information about him that is on the server, I don't know how to do it, I tried and failed.

civic pawn
#

to do that you need to add arg with discord.Member to your func

async def userinfo(ctx, member: discord.Member)

and then you just get name and id through member

civic pawn
#

?tag close

drowsy fiberBOT
#

dynoError No tag close found.

violet needle
#

.tag close

tranquil hingeBOT
#

Done with your help thread?

Please close your own help thread by using </close:882631512829329448> with @fossil niche.

civic pawn
#

like how would you get other member’s info through ctx.author