Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a method to fetch a preview of a discoverable guild #9986

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

gingershaped
Copy link

@gingershaped gingershaped commented Oct 25, 2024

Summary

This implements a method to fetch a preview of a discoverable guild.

>>> await client.fetch_guild_preview(937435293294919690)
<GuildPreview id=937435293294919690 name='Create Aeronautics' features=['SOUNDBOARD', 'VANITY_URL', 'AUTO_MODERATION', 'PRIVATE_THREADS', 'SEVEN_DAY_THREAD_ARCHIVE', 'THREE_DAY_THREAD_ARCHIVE', 'ROLE_ICONS', 'ANIMATED_ICON', 'GUILD_ONBOARDING_HAS_PROMPTS', 'BANNER', 'GUILD_WEB_PAGE_VANITY_URL', 'GUILD_SERVER_GUIDE', 'CHANNEL_ICON_EMOJIS_GENERATED', 'PREVIEW_ENABLED', 'COMMUNITY', 'AUTOMOD_TRIGGER_USER_PROFILE', 'MEMBER_PROFILES', 'DISCOVERABLE', 'ENABLED_DISCOVERABLE_BEFORE', 'MEMBER_VERIFICATION_GATE_ENABLED', 'GUILD_ONBOARDING', 'NEWS', 'ANIMATED_BANNER', 'INVITE_SPLASH', 'COMMUNITY_EXP_LARGE_GATED', 'GUILD_ONBOARDING_EVER_ENABLED', 'TEXT_IN_VOICE_ENABLED', 'WELCOME_SCREEN_ENABLED'] description='Expanding the Create mod with physics-based contraptions limited only by your own imagination!'>

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

Closes #9890.

discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
discord/state.py Outdated Show resolved Hide resolved
discord/state.py Outdated Show resolved Hide resolved
docs/api.rst Outdated Show resolved Hide resolved
@gingershaped gingershaped requested a review from MCausc78 October 25, 2024 21:25
Copy link
Owner

@Rapptz Rapptz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR and sorry for the late review.

This PR looks good, it just needs to have the versionchanged strings.

discord/client.py Outdated Show resolved Hide resolved
discord/guild.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a method for fetching a preview of a discoverable guild
3 participants