Tushar Singh
Tushar Singh

Reputation: 299

Discord.py: How to get member join date?

I'm trying to make a command like this: r!info user which will give all information about the user who is tagged there. But I'm not sure how to get the date at which the member joined the server. I'm using Discord.py with Python 3.9. Any help will be appreciated. Thank you

Upvotes: 0

Views: 3801

Answers (1)

user17099653
user17099653

Reputation:

To get a join date you should to use member.joined_at and it'll show member join date, bot will show like this.

You can also try another script contained with member.joined_at

@client.command()
async def memberjoin(ctx, member: discord.Member):
      joined_at = member.joined_at.strftime("%b %d, %Y, %T")
      await ctx.send(f" {member.mention} Joined at {joined_at}")

Client will show like this

Upvotes: 6

Related Questions