'How to get the member's server nickname discord.py
I want to get the member's nickname from a certain server which i chose. Not the server the command is sent in
Solution 1:[1]
- Your bot needs to be in the guild you want to get the nickname from.
- You then can fetch/get the guild using:
guild = await client.fetch_guild(guild_id) - Then you can fetch the member from that guild using:
member = await guild.fetch_member(member_id) - Using the nick attribute you can return the nick.
print(member.nick)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | XoutDragon |
