Home > Mobile >  discord.py get member object by id
discord.py get member object by id

Time:02-27

I want to do something with my discord bot where it can get members by their ids, so if I had an example id 1234, I would do something like:

user = # where the way to get the user would be
# then...
userid = user.id # same atts and funcs like in message.author

I am using client:

import discord

client = discord.Client()

CodePudding user response:

You're looking for user = client.get_member(user.id).

  • Related