dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
680 stars 161 forks source link

fetch_member_profile() isn't working #462

Closed Lofimit closed 1 year ago

Lofimit commented 1 year ago

Summary

fetch_member_profile() cant be used

Reproduction Steps

I just tried to use the function.

Code

import discord, json, time

config = json.load(open("config.json"))
tkn = config["token"]
guildid = config["Guild_ID"]

class MyClient(discord.Client):
    async def on_message(self, message):
        if message.content == "?test":
            guild = self.get_guild(guildid)
            for member in guild.members:
                print(str(member))
                x = await guild.fetch_member_profile(member.id, with_mutuals=True, fetch_note=False)
                print(x.bio)

client = MyClient()
client.run(tkn)

Expected Results

It should return a 'MemberProfile' object.

Actual Results

I can't even use the fetch_member_profile() function.

System Information

Checklist

Additional Information

It isn't an attribute.

AttributeError: 'Guild' object has no attribute 'fetch_member_profile'

Attributes list: list = ['_PREMIUM_GUILD_LIMITS', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '_add_channel', '_add_member', '_add_role', '_channels', '_create_channel', '_from_data', '_large', '_member_count', '_members', '_online_count', '_public_updates_channel_id', '_remove_channel', '_remove_member', '_remove_role', '_roles', '_rules_channel_id', '_state', '_subscribing', '_system_channel_flags', '_system_channel_id', '_update_voice_state', '_voice_state_for', '_voice_states', 'ack', 'afk_channel', 'afk_timeout', 'audit_logs', 'ban', 'banner', 'banner_url', 'banner_url_as', 'bans', 'bitrate_limit', 'by_category', 'categories', 'change_voice_state', 'channels', 'chunk', 'chunked', 'create_category', 'create_category_channel', 'create_custom_emoji', 'create_integration', 'create_role', 'create_stage_channel', 'create_template', 'create_text_channel', 'create_voice_channel', 'created_at', 'default_notifications', 'default_role', 'delete', 'description', 'discovery_splash', 'discovery_splash_url', 'discovery_splash_url_as', 'edit', 'edit_role_positions', 'emoji_limit', 'emojis', 'estimate_pruned_members', 'explicit_content_filter', 'features', 'fetch_ban', 'fetch_channels', 'fetch_emoji', 'fetch_emojis', 'fetch_integrations', 'fetch_member', 'fetch_roles', 'filesize_limit', 'get_channel', 'get_member', 'get_member_named', 'get_role', 'icon', 'icon_url', 'icon_url_as', 'id', 'integrations', 'invites', 'is_icon_animated', 'kick', 'large', 'leave', 'max_members', 'max_presences', 'max_video_channel_users', 'me', 'member_count', 'members', 'mfa_level', 'mute', 'name', 'online_count', 'owner', 'owner_id', 'preferred_locale', 'premium_subscriber_role', 'premium_subscribers', 'premium_subscription_count', 'premium_tier', 'prune_members', 'public_updates_channel', 'query_members', 'region', 'roles', 'rules_channel', 'splash', 'splash_url', 'splash_url_as', 'stage_channels', 'subscribe', 'subscribed', 'system_channel', 'system_channel_flags', 'templates', 'text_channels', 'unavailable', 'unban', 'unmute', 'vanity_invite', 'verification_level', 'voice_channels', 'voice_client', 'webhooks', 'widget']

Lofimit commented 1 year ago

Same applies to the Member.profile() function, which is also not working.

dolfies commented 1 year ago

Install the current alpha from the master branch.