diff --git a/changelog/1292.breaking.rst b/changelog/1292.breaking.rst new file mode 100644 index 0000000000..8828bf8a29 --- /dev/null +++ b/changelog/1292.breaking.rst @@ -0,0 +1,2 @@ +Remove the deprecated :meth:`Guild.delete`, :meth:`Client.guild_builder`, :meth:`Client.create_guild`, :meth:`Template.create_guild` and :class:`GuildBuilder` discord API features. +For more information look at https://github.com/discord/discord-api-docs/pull/7469. diff --git a/disnake/client.py b/disnake/client.py index 9e0ee512d3..8b4ad82e74 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -59,7 +59,7 @@ ) from .flags import ApplicationFlags, Intents, MemberCacheFlags from .gateway import DiscordWebSocket, ReconnectWebSocket -from .guild import Guild, GuildBuilder +from .guild import Guild from .guild_preview import GuildPreview from .http import HTTPClient from .i18n import LocalizationProtocol, LocalizationStore @@ -87,7 +87,6 @@ from .abc import GuildChannel, PrivateChannel, Snowflake, SnowflakeTime from .app_commands import APIApplicationCommand, MessageCommand, SlashCommand, UserCommand - from .asset import AssetBytes from .channel import DMChannel from .member import Member from .message import Message @@ -2099,102 +2098,6 @@ async def fetch_guild_preview( data = await self.http.get_guild_preview(guild_id) return GuildPreview(data=data, state=self._connection) - async def create_guild( - self, - *, - name: str, - icon: AssetBytes = MISSING, - code: str = MISSING, - ) -> Guild: - """|coro| - - Creates a :class:`.Guild`. - - See :func:`guild_builder` for a more comprehensive alternative. - - Bot accounts in 10 or more guilds are not allowed to create guilds. - - .. note:: - - Using this, you will **not** receive :attr:`.Guild.channels`, :attr:`.Guild.members`, - :attr:`.Member.activity` and :attr:`.Member.voice` per :class:`.Member`. - - .. versionchanged:: 2.5 - Removed the ``region`` parameter. - - .. versionchanged:: 2.6 - Raises :exc:`ValueError` instead of ``InvalidArgument``. - - Parameters - ---------- - name: :class:`str` - The name of the guild. - icon: |resource_type| - The icon of the guild. - See :meth:`.ClientUser.edit` for more details on what is expected. - - .. versionchanged:: 2.5 - Now accepts various resource types in addition to :class:`bytes`. - - code: :class:`str` - The code for a template to create the guild with. - - .. versionadded:: 1.4 - - Raises - ------ - NotFound - The ``icon`` asset couldn't be found. - HTTPException - Guild creation failed. - ValueError - Invalid icon image format given. Must be PNG or JPG. - TypeError - The ``icon`` asset is a lottie sticker (see :func:`Sticker.read `). - - Returns - ------- - :class:`.Guild` - The created guild. This is not the same guild that is added to cache. - """ - if icon is not MISSING: - icon_base64 = await utils._assetbytes_to_base64_data(icon) - else: - icon_base64 = None - - if code: - data = await self.http.create_from_template(code, name, icon_base64) - else: - data = await self.http.create_guild(name, icon_base64) - return Guild(data=data, state=self._connection) - - def guild_builder(self, name: str) -> GuildBuilder: - """Creates a builder object that can be used to create more complex guilds. - - This is a more comprehensive alternative to :func:`create_guild`. - See :class:`.GuildBuilder` for details and examples. - - Bot accounts in 10 or more guilds are not allowed to create guilds. - - .. note:: - - Using this, you will **not** receive :attr:`.Guild.channels`, :attr:`.Guild.members`, - :attr:`.Member.activity` and :attr:`.Member.voice` per :class:`.Member`. - - .. versionadded:: 2.8 - - Parameters - ---------- - name: :class:`str` - The name of the guild. - - Returns - ------- - :class:`.GuildBuilder` - The guild builder object for configuring and creating a new guild. - """ - return GuildBuilder(name=name, state=self._connection) - async def fetch_stage_instance(self, channel_id: int, /) -> StageInstance: """|coro| diff --git a/disnake/guild.py b/disnake/guild.py index 760bd619db..5a7fd913ae 100644 --- a/disnake/guild.py +++ b/disnake/guild.py @@ -14,7 +14,6 @@ List, Literal, NamedTuple, - NewType, Optional, Sequence, Set, @@ -83,10 +82,7 @@ from .welcome_screen import WelcomeScreen, WelcomeScreenChannel from .widget import Widget, WidgetSettings -__all__ = ( - "Guild", - "GuildBuilder", -) +__all__ = ("Guild",) VocalGuildChannel = Union[VoiceChannel, StageChannel] MISSING = utils.MISSING @@ -100,11 +96,8 @@ from .state import ConnectionState from .template import Template from .threads import AnyThreadArchiveDuration, ForumTag - from .types.channel import PermissionOverwrite as PermissionOverwritePayload from .types.guild import ( Ban as BanPayload, - CreateGuildPlaceholderChannel, - CreateGuildPlaceholderRole, Guild as GuildPayload, GuildFeature, MFALevel, @@ -1998,11 +1991,6 @@ async def leave(self) -> None: Leaves the guild. - .. note:: - - You cannot leave the guild that you own, you must delete it instead - via :meth:`delete`. - Raises ------ HTTPException @@ -2010,21 +1998,6 @@ async def leave(self) -> None: """ await self._state.http.leave_guild(self.id) - async def delete(self) -> None: - """|coro| - - Deletes the guild. You must be the guild owner to delete the - guild. - - Raises - ------ - HTTPException - Deleting the guild failed. - Forbidden - You do not have permissions to delete the guild. - """ - await self._state.http.delete_guild(self.id) - async def edit( self, *, @@ -5158,461 +5131,3 @@ async def fetch_soundboard_sounds(self) -> List[GuildSoundboardSound]: return [ GuildSoundboardSound(data=d, state=self._state, guild_id=self.id) for d in data["items"] ] - - -PlaceholderID = NewType("PlaceholderID", int) - - -class GuildBuilder: - """A guild builder object, created by :func:`Client.guild_builder`. - - This allows for easier configuration of more complex guild setups, - abstracting away some of the quirks of the guild creation endpoint. - - .. versionadded:: 2.8 - - .. note:: - Many methods of this class return unspecified placeholder IDs - (called ``PlaceholderID`` below) that can be used to reference the - created object in other objects, for example referencing a category when - creating a new text channel, or a role when setting permission overwrites. - - Examples - -------- - Basic usage: - - .. code-block:: python3 - - builder = client.guild_builder("Cat Pics") - builder.add_text_channel("meow", topic="cat.") - guild = await builder.create() - - Adding more channels + roles: - - .. code-block:: python3 - - builder = client.guild_builder("More Cat Pics") - builder.add_text_channel("welcome") - - # add roles - guests = builder.add_role("guests") - admins = builder.add_role( - "catmins", - permissions=Permissions(administrator=True), - hoist=True, - ) - - # add cat-egory and text channel - category = builder.add_category("cats!") - meow_channel = builder.add_text_channel( - "meow", - topic="cat.", - category=category, - overwrites={guests: PermissionOverwrite(send_messages=False)} - ) - - # set as system channel - builder.system_channel = meow_channel - - # add hidden voice channel - builder.add_voice_channel( - "secret-admin-vc", - category=category, - overwrites={builder.everyone: PermissionOverwrite(view_channel=False)} - ) - - # finally, create the guild - guild = await builder.create() - - Attributes - ---------- - name: :class:`str` - The name of the new guild. - icon: Optional[|resource_type|] - The icon of the new guild. - verification_level: Optional[:class:`VerificationLevel`] - The verification level of the new guild. - default_notifications: Optional[:class:`NotificationLevel`] - The default notification level for the new guild. - explicit_content_filter: Optional[:class:`ContentFilter`] - The explicit content filter for the new guild. - afk_channel: Optional[``PlaceholderID``] - The channel that is used as the AFK channel. - afk_timeout: Optional[:class:`int`] - The number of seconds until someone is moved to the AFK channel. - system_channel: Optional[``PlaceholderID``] - The channel that is used as the system channel. - system_channel_flags: Optional[:class:`SystemChannelFlags`] - The settings to use with the system channel. - """ - - def __init__(self, *, state: ConnectionState, name: str) -> None: - self._state = state - self.name: str = name - - # note: the first role corresponds to @everyone - self._roles: List[CreateGuildPlaceholderRole] = [] - self._channels: List[CreateGuildPlaceholderChannel] = [] - - self.icon: Optional[AssetBytes] = None - self.verification_level: Optional[VerificationLevel] = None - self.default_notifications: Optional[NotificationLevel] = None - self.explicit_content_filter: Optional[ContentFilter] = None - self.afk_channel: Optional[PlaceholderID] = None - self.afk_timeout: Optional[int] = None - self.system_channel: Optional[PlaceholderID] = None - self.system_channel_flags: Optional[SystemChannelFlags] = None - - self._current_id: int = 1 - - self._everyone_id: PlaceholderID = self._next_id() - - def _next_id(self) -> PlaceholderID: - self._current_id = (_id := self._current_id) + 1 - return PlaceholderID(_id) - - def _add_channel( - self, - *, - type: ChannelType, - name: str, - overwrites: Dict[PlaceholderID, PermissionOverwrite] = MISSING, - category: PlaceholderID = MISSING, - topic: Optional[str] = MISSING, - slowmode_delay: int = MISSING, - nsfw: bool = MISSING, - ) -> Tuple[PlaceholderID, CreateGuildPlaceholderChannel]: - _id = self._next_id() - data: CreateGuildPlaceholderChannel = { - "id": _id, - "type": try_enum_to_int(type), - "name": name, - } - - if overwrites is not MISSING: - overwrites_data: List[PermissionOverwritePayload] = [] - for target, perm in overwrites.items(): - allow, deny = perm.pair() - overwrites_data.append( - { - "allow": str(allow.value), - "deny": str(deny.value), - "id": target, - # can only set overrides for roles here - "type": abc._Overwrites.ROLE, - } - ) - data["permission_overwrites"] = overwrites_data - - if category is not MISSING: - data["parent_id"] = category - - if topic is not MISSING: - data["topic"] = topic - - if slowmode_delay is not MISSING: - data["rate_limit_per_user"] = slowmode_delay - - if nsfw is not MISSING: - data["nsfw"] = nsfw - - self._channels.append(data) - return _id, data - - @property - def everyone(self) -> PlaceholderID: - """``PlaceholderID``: The placeholder ID used for the ``@everyone`` role.""" - return self._everyone_id - - async def create(self) -> Guild: - """|coro| - - Creates the configured guild. - - Raises - ------ - NotFound - The :attr:`.icon` asset couldn't be found. - HTTPException - Guild creation failed. - ValueError - Invalid icon image format given. Must be PNG or JPG. - TypeError - The :attr:`.icon` asset is a lottie sticker (see :func:`Sticker.read `). - - Returns - ------- - :class:`.Guild` - The created guild. This is not the same guild that is added to cache. - - .. note:: - Due to API limitations, this returned guild does - not contain any of the configured channels. - """ - if self.icon is not None: - icon_base64 = await utils._assetbytes_to_base64_data(self.icon) - else: - icon_base64 = None - - data = await self._state.http.create_guild( - name=self.name, - icon=icon_base64, - roles=self._roles if self._roles else None, - channels=self._channels if self._channels else None, - verification_level=try_enum_to_int(self.verification_level), - default_message_notifications=try_enum_to_int(self.default_notifications), - explicit_content_filter=try_enum_to_int(self.explicit_content_filter), - afk_channel=self.afk_channel, - afk_timeout=self.afk_timeout, - system_channel=self.system_channel, - system_channel_flags=try_enum_to_int(self.system_channel_flags), - ) - return Guild(data=data, state=self._state) - - def update_everyone_role(self, *, permissions: Permissions = MISSING) -> PlaceholderID: - """Updates attributes of the ``@everyone`` role. - - Parameters - ---------- - permissions: :class:`Permissions` - The permissions the role should have. - - Returns - ------- - ``PlaceholderID`` - The placeholder ID for the ``@everyone`` role. - Also available as :attr:`everyone`. - """ - if len(self._roles) == 0: - self._roles.append({"id": self._everyone_id}) - role = self._roles[0] - - if permissions is not MISSING: - role["permissions"] = str(permissions.value) - - return self._everyone_id - - def add_role( - self, - name: str = MISSING, - *, - permissions: Permissions = MISSING, - color: Union[Colour, int] = MISSING, - colour: Union[Colour, int] = MISSING, - hoist: bool = MISSING, - mentionable: bool = MISSING, - ) -> PlaceholderID: - """Adds a role to the guild builder. - - The default (``@everyone``) role can be referenced using :attr:`everyone` - and configured through :func:`update_everyone_role`. - - Parameters - ---------- - name: :class:`str` - The role name. Defaults to 'new role'. - permissions: :class:`Permissions` - The permissions the role should have. Defaults to no permissions. - colour: Union[:class:`Colour`, :class:`int`] - The colour for the role. Defaults to :meth:`Colour.default`. - This is aliased to ``color`` as well. - hoist: :class:`bool` - Whether the role should be shown separately in the member list. - Defaults to ``False``. - mentionable: :class:`bool` - Whether the role should be mentionable by others. - Defaults to ``False``. - - Returns - ------- - ``PlaceholderID`` - A placeholder ID for the created role. - """ - # always create @everyone role first if not created already - if len(self._roles) == 0: - self.update_everyone_role() - - _id = self._next_id() - data: CreateGuildPlaceholderRole = {"id": _id} - - if name is not MISSING: - data["name"] = name - - if permissions is not MISSING: - data["permissions"] = str(permissions.value) - else: - data["permissions"] = "0" - - actual_colour = colour or color or Colour.default() - if isinstance(actual_colour, int): - data["color"] = actual_colour - else: - data["color"] = actual_colour.value - - if hoist is not MISSING: - data["hoist"] = hoist - - if mentionable is not MISSING: - data["mentionable"] = mentionable - - self._roles.append(data) - return _id - - def add_category( - self, - name: str, - *, - overwrites: Dict[PlaceholderID, PermissionOverwrite] = MISSING, - ) -> PlaceholderID: - """Adds a category channel to the guild builder. - - There is an alias for this named ``add_category_channel``. - - Parameters - ---------- - name: :class:`str` - The category's name. - overwrites: Dict[``PlaceholderID``, :class:`PermissionOverwrite`] - A :class:`dict` of roles to :class:`PermissionOverwrite`\\s which can be synced to channels. - - Returns - ------- - ``PlaceholderID`` - A placeholder ID for the created category. - """ - _id, _ = self._add_channel(type=ChannelType.category, name=name, overwrites=overwrites) - return _id - - add_category_channel = add_category - - def add_text_channel( - self, - name: str, - *, - overwrites: Dict[PlaceholderID, PermissionOverwrite] = MISSING, - category: PlaceholderID = MISSING, - topic: Optional[str] = MISSING, - slowmode_delay: int = MISSING, - nsfw: bool = MISSING, - default_auto_archive_duration: AnyThreadArchiveDuration = MISSING, - ) -> PlaceholderID: - """Adds a text channel to the guild builder. - - Parameters - ---------- - name: :class:`str` - The channel's name. - overwrites: Dict[``PlaceholderID``, :class:`PermissionOverwrite`] - A :class:`dict` of roles to :class:`PermissionOverwrite`\\s to apply to the channel. - category: ``PlaceholderID`` - The category to place the new channel under. - - .. warning:: - Unlike :func:`Guild.create_text_channel`, the parent category's - permissions will *not* be synced to this new channel by default. - - topic: Optional[:class:`str`] - The channel's topic. - slowmode_delay: :class:`int` - Specifies the slowmode rate limit for users in this channel, in seconds. - A value of ``0`` disables slowmode. The maximum value possible is ``21600``. - If not provided, slowmode is disabled. - nsfw: :class:`bool` - Whether to mark the channel as NSFW. - default_auto_archive_duration: Union[:class:`int`, :class:`ThreadArchiveDuration`] - The default auto archive duration in minutes for threads created in this channel. - Must be one of ``60``, ``1440``, ``4320``, or ``10080``. - - Returns - ------- - ``PlaceholderID`` - A placeholder ID for the created text channel. - """ - _id, data = self._add_channel( - type=ChannelType.text, - name=name, - overwrites=overwrites, - category=category, - topic=topic, - slowmode_delay=slowmode_delay, - nsfw=nsfw, - ) - - if default_auto_archive_duration is not MISSING: - data["default_auto_archive_duration"] = cast( - "ThreadArchiveDurationLiteral", try_enum_to_int(default_auto_archive_duration) - ) - - return _id - - def add_voice_channel( - self, - name: str, - *, - overwrites: Dict[PlaceholderID, PermissionOverwrite] = MISSING, - category: PlaceholderID = MISSING, - slowmode_delay: int = MISSING, - nsfw: bool = MISSING, - bitrate: int = MISSING, - user_limit: int = MISSING, - rtc_region: Optional[Union[str, VoiceRegion]] = MISSING, - video_quality_mode: VideoQualityMode = MISSING, - ) -> PlaceholderID: - """Adds a voice channel to the guild builder. - - Parameters - ---------- - name: :class:`str` - The channel's name. - overwrites: Dict[``PlaceholderID``, :class:`PermissionOverwrite`] - A :class:`dict` of roles to :class:`PermissionOverwrite`\\s to apply to the channel. - category: ``PlaceholderID`` - The category to place the new channel under. - - .. warning:: - Unlike :func:`Guild.create_voice_channel`, the parent category's - permissions will *not* be synced to this new channel by default. - - slowmode_delay: :class:`int` - Specifies the slowmode rate limit for users in this channel, in seconds. - A value of ``0`` disables slowmode. The maximum value possible is ``21600``. - If not provided, slowmode is disabled. - nsfw: :class:`bool` - Whether to mark the channel as NSFW. - bitrate: :class:`int` - The channel's preferred audio bitrate in bits per second. - user_limit: :class:`int` - The channel's limit for number of members that can be in a voice channel. - rtc_region: Optional[Union[:class:`str`, :class:`VoiceRegion`]] - The region for the voice channel's voice communication. - A value of ``None`` indicates automatic voice region detection. - video_quality_mode: :class:`VideoQualityMode` - The camera video quality for the voice channel's participants. - - Returns - ------- - ``PlaceholderID`` - A placeholder ID for the created voice channel. - """ - _id, data = self._add_channel( - type=ChannelType.voice, - name=name, - overwrites=overwrites, - category=category, - slowmode_delay=slowmode_delay, - nsfw=nsfw, - ) - - if bitrate is not MISSING: - data["bitrate"] = bitrate - - if user_limit is not MISSING: - data["user_limit"] = user_limit - - if rtc_region is not MISSING: - data["rtc_region"] = None if rtc_region is None else str(rtc_region) - - if video_quality_mode is not MISSING: - data["video_quality_mode"] = try_enum_to_int(video_quality_mode) - - return _id diff --git a/disnake/http.py b/disnake/http.py index b258985016..f991e0df03 100644 --- a/disnake/http.py +++ b/disnake/http.py @@ -1387,50 +1387,6 @@ def get_guild(self, guild_id: Snowflake, *, with_counts: bool = True) -> Respons params = {"with_counts": int(with_counts)} return self.request(Route("GET", "/guilds/{guild_id}", guild_id=guild_id), params=params) - def delete_guild(self, guild_id: Snowflake) -> Response[None]: - return self.request(Route("DELETE", "/guilds/{guild_id}", guild_id=guild_id)) - - def create_guild( - self, - name: str, - icon: Optional[str] = None, - *, - verification_level: Optional[guild.VerificationLevel] = None, - default_message_notifications: Optional[guild.DefaultMessageNotificationLevel] = None, - explicit_content_filter: Optional[guild.ExplicitContentFilterLevel] = None, - roles: Optional[List[guild.CreateGuildPlaceholderRole]] = None, - channels: Optional[List[guild.CreateGuildPlaceholderChannel]] = None, - afk_channel: Optional[Snowflake] = None, - afk_timeout: Optional[int] = None, - system_channel: Optional[Snowflake] = None, - system_channel_flags: Optional[int] = None, - ) -> Response[guild.Guild]: - payload: guild.CreateGuild = { - "name": name, - } - if icon: - payload["icon"] = icon - if verification_level is not None: - payload["verification_level"] = verification_level - if default_message_notifications is not None: - payload["default_message_notifications"] = default_message_notifications - if explicit_content_filter is not None: - payload["explicit_content_filter"] = explicit_content_filter - if roles is not None: - payload["roles"] = roles - if channels is not None: - payload["channels"] = channels - if afk_channel is not None: - payload["afk_channel_id"] = afk_channel - if afk_timeout is not None: - payload["afk_timeout"] = afk_timeout - if system_channel is not None: - payload["system_channel_id"] = system_channel - if system_channel_flags is not None: - payload["system_channel_flags"] = system_channel_flags - - return self.request(Route("POST", "/guilds"), json=payload) - def edit_guild( self, guild_id: Snowflake, *, reason: Optional[str] = None, **fields: Any ) -> Response[guild.Guild]: @@ -1499,16 +1455,6 @@ def delete_template(self, guild_id: Snowflake, code: str) -> Response[None]: Route("DELETE", "/guilds/{guild_id}/templates/{code}", guild_id=guild_id, code=code) ) - def create_from_template( - self, code: str, name: str, icon: Optional[str] - ) -> Response[guild.Guild]: - payload = { - "name": name, - } - if icon: - payload["icon"] = icon - return self.request(Route("POST", "/guilds/templates/{code}", code=code), json=payload) - def get_guild_preview(self, guild_id: Snowflake) -> Response[guild.GuildPreview]: return self.request(Route("GET", "/guilds/{guild_id}/preview", guild_id=guild_id)) diff --git a/disnake/template.py b/disnake/template.py index f0a0777abd..f9f7e78bb2 100644 --- a/disnake/template.py +++ b/disnake/template.py @@ -5,14 +5,13 @@ from typing import TYPE_CHECKING, Any, NoReturn, Optional from .guild import Guild -from .utils import MISSING, _assetbytes_to_base64_data, parse_time +from .utils import MISSING, parse_time __all__ = ("Template",) if TYPE_CHECKING: import datetime - from .asset import AssetBytes from .state import ConnectionState from .types.template import Template as TemplatePayload from .user import User @@ -146,53 +145,6 @@ def __repr__(self) -> str: f" creator={self.creator!r} source_guild={self.source_guild!r} is_dirty={self.is_dirty}>" ) - async def create_guild(self, name: str, icon: Optional[AssetBytes] = None) -> Guild: - """|coro| - - Creates a :class:`.Guild` using the template. - - Bot accounts in more than 10 guilds are not allowed to create guilds. - - .. versionchanged:: 2.5 - Removed the ``region`` parameter. - - .. versionchanged:: 2.6 - Raises :exc:`ValueError` instead of ``InvalidArgument``. - - Parameters - ---------- - name: :class:`str` - The name of the guild. - icon: Optional[|resource_type|] - The icon of the guild. - See :meth:`.ClientUser.edit` for more details on what is expected. - - .. versionchanged:: 2.5 - Now accepts various resource types in addition to :class:`bytes`. - - - Raises - ------ - NotFound - The ``icon`` asset couldn't be found. - HTTPException - Guild creation failed. - TypeError - The ``icon`` asset is a lottie sticker (see :func:`Sticker.read`). - ValueError - Invalid icon image format given. Must be PNG or JPG. - - Returns - ------- - :class:`.Guild` - The guild created. This is not the same guild that is - added to cache. - """ - icon_data = await _assetbytes_to_base64_data(icon) - - data = await self._state.http.create_from_template(self.code, name, icon_data) - return Guild(data=data, state=self._state) - async def sync(self) -> Template: """|coro| diff --git a/disnake/types/guild.py b/disnake/types/guild.py index 6b53b8e1f3..f18848d7ca 100644 --- a/disnake/types/guild.py +++ b/disnake/types/guild.py @@ -5,11 +5,11 @@ from typing_extensions import NotRequired from .activity import PartialPresenceUpdate -from .channel import CreateGuildChannel, GuildChannel, StageInstance +from .channel import GuildChannel, StageInstance from .emoji import Emoji from .guild_scheduled_event import GuildScheduledEvent from .member import Member -from .role import CreateRole, Role +from .role import Role from .snowflake import Snowflake from .soundboard import GuildSoundboardSound from .sticker import GuildSticker @@ -175,25 +175,3 @@ class RolePositionUpdate(TypedDict): class MFALevelUpdate(TypedDict): level: MFALevel - - -class CreateGuildPlaceholderRole(CreateRole): - id: Snowflake - - -class CreateGuildPlaceholderChannel(CreateGuildChannel): - id: NotRequired[Snowflake] - - -class CreateGuild(TypedDict): - name: str - icon: NotRequired[str] - verification_level: NotRequired[VerificationLevel] - default_message_notifications: NotRequired[DefaultMessageNotificationLevel] - explicit_content_filter: NotRequired[ExplicitContentFilterLevel] - roles: NotRequired[List[CreateGuildPlaceholderRole]] - channels: NotRequired[List[CreateGuildPlaceholderChannel]] - afk_channel_id: NotRequired[Snowflake] - afk_timeout: NotRequired[int] - system_channel_id: NotRequired[Snowflake] - system_channel_flags: NotRequired[int] diff --git a/docs/api/guilds.rst b/docs/api/guilds.rst index 25aaaa6f6d..59765bb41d 100644 --- a/docs/api/guilds.rst +++ b/docs/api/guilds.rst @@ -131,15 +131,6 @@ WelcomeScreenChannel .. autoclass:: WelcomeScreenChannel() -GuildBuilder -~~~~~~~~~~~~~ - -.. attributetable:: GuildBuilder - -.. autoclass:: GuildBuilder() - :members: - :exclude-members: add_category_channel - Enumerations ------------