M
M
Mind20772021-03-06 11:13:48
Python
Mind2077, 2021-03-06 11:13:48

How to solve the problem with the .userinfo command, where it gives incomprehensible arguments?

@bot.command()
async def user(ctx,member=discord.Member):
    if member == None:
        member = ctx.message.author
    createdate = member.created_at 
    joindate = member.joined_at
    embed = discord.Embed(title=f'Информация о пользователе {member.mention}.',description='')
    embed.add_field(name='Никнейм:',value=member)    
    embed.add_field(name='Дата создания аккаунта:',value=createdate)
    embed.add_field(name='Дата входа на сервер:',value=joindate)
    embed.add_field(name="ID", value=member.id)  
    embed.set_footer(text=f"Запросил: {ctx.author}", icon_url=ctx.author.avatar_url) 
    await ctx.send(embed=embed)

And in response, he writes what I wrote, but leaves the variables the same as they were in the code
Help me decide!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-03-06
@SoreMix

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question