csgo-league / csgo-league-bot

League Discord bot
https://discord.gg/b5MhANU
GNU General Public License v3.0
14 stars 12 forks source link

Improve volunteer pick team method #34

Closed thboss closed 4 years ago

thboss commented 4 years ago
thboss commented 4 years ago

I was thinking of add function to bot.py to return the correct user name

cameronshinn commented 4 years ago

Actually in the docs it does say that Member.display_name will return the guild-specific nickname if there is one. This is because the Member object is associated with a guild.

I think this is the reason why I removed those lines of code to get the nickname or display name if it's None. But I have been noticing that it won't pick up the nickname in some places. Do you see that happening too?

I think the issue is that some of the object we are using are User objects and not Member objects, so it doesn't get their nickname when we call player.display_name. At least that's what I think. Could we remove that code for now and do another PR after investigate that?