How do you get a discord users profile picture by ID?
Question:
Let’s just say a user is not in the same server as the bot but you have the user’s user id how can i get the users profile picture like that?
Answers:
async def fake(self, ctx, user_id):
user = await self.bot.fetch_user(user_id)
print(user)
await ctx.send(user.avatar.url)
fetch makes an api call
Let’s just say a user is not in the same server as the bot but you have the user’s user id how can i get the users profile picture like that?
async def fake(self, ctx, user_id):
user = await self.bot.fetch_user(user_id)
print(user)
await ctx.send(user.avatar.url)
fetch makes an api call