So i\'m trying to get a user object from an id or tag, however i am using a user account not a bot account so i cant use get_user_info() Is there any way to
If you know the user id, I suggest using bot.get_user(user_id) instead.
If you're using commands
, you can use a converter
@bot.command(pass_sontext=True)
async def mycommand(ctx, user: discord.User):
# user is a User object
Other wise, you can use Client.get_all_members to get all Member
objects you can see.
from discord.utils import get
user = get(bot.get_all_members(), id="1234")
if user:
# found
else:
# Not found
You can use:
ctx.message.server.get_member("id") or message.server.get_member("id")
This will return you a discord.Member
object.