tomfoolery
This commit is contained in:
parent
33a32a331e
commit
c633fd8ab7
|
@ -109,7 +109,8 @@ class DiscordDataClient(discord.Client):
|
||||||
try:
|
try:
|
||||||
# Get all members - discord.py-self API
|
# Get all members - discord.py-self API
|
||||||
members = []
|
members = []
|
||||||
async for member in guild.fetch_members():
|
member_iterator = await guild.fetch_members()
|
||||||
|
async for member in member_iterator:
|
||||||
members.append(member)
|
members.append(member)
|
||||||
|
|
||||||
for member in members:
|
for member in members:
|
||||||
|
@ -185,17 +186,8 @@ class DiscordDataClient(discord.Client):
|
||||||
bio = user.bio
|
bio = user.bio
|
||||||
self.logger.debug(f"Found bio via user.bio for {user.name}")
|
self.logger.debug(f"Found bio via user.bio for {user.name}")
|
||||||
|
|
||||||
# Method 2: Try to get full user profile
|
# Method 2: User clients can't fetch other user profiles (403 error)
|
||||||
elif hasattr(user, 'id'):
|
# Skip profile fetching for user clients
|
||||||
try:
|
|
||||||
profile = await self.fetch_user(user.id)
|
|
||||||
if hasattr(profile, 'bio') and profile.bio:
|
|
||||||
bio = profile.bio
|
|
||||||
self.logger.debug(f"Found bio via profile fetch for {user.name}")
|
|
||||||
else:
|
|
||||||
self.logger.debug(f"No bio found in profile for {user.name}")
|
|
||||||
except Exception as e:
|
|
||||||
self.logger.debug(f"Profile fetch failed for {user.name}: {e}")
|
|
||||||
|
|
||||||
# Method 3: Check for activities that might contain bio-like info
|
# Method 3: Check for activities that might contain bio-like info
|
||||||
if not bio and hasattr(user, 'activities'):
|
if not bio and hasattr(user, 'activities'):
|
||||||
|
|
Loading…
Reference in a new issue