tomfoolery

This commit is contained in:
Xargana 2025-07-14 10:32:08 +03:00
parent 33a32a331e
commit c633fd8ab7

View file

@ -109,7 +109,8 @@ class DiscordDataClient(discord.Client):
try:
# Get all members - discord.py-self API
members = []
async for member in guild.fetch_members():
member_iterator = await guild.fetch_members()
async for member in member_iterator:
members.append(member)
for member in members:
@ -185,17 +186,8 @@ class DiscordDataClient(discord.Client):
bio = user.bio
self.logger.debug(f"Found bio via user.bio for {user.name}")
# Method 2: Try to get full user profile
elif hasattr(user, 'id'):
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 2: User clients can't fetch other user profiles (403 error)
# Skip profile fetching for user clients
# Method 3: Check for activities that might contain bio-like info
if not bio and hasattr(user, 'activities'):