|
30 | 30 |
|
31 | 31 | import discord.abc |
32 | 32 |
|
33 | | -from .utils.private import bytes_to_base64_data, get_as_snowflake |
| 33 | +from .utils.private import bytes_to_base64_data, get_as_snowflake, copy_doc |
34 | 34 | from . import utils |
35 | 35 | from .asset import Asset |
36 | 36 | from .emoji import GuildEmoji |
@@ -244,7 +244,7 @@ def type(self) -> ChannelType: |
244 | 244 | def _sorting_bucket(self) -> int: |
245 | 245 | return ChannelType.text.value |
246 | 246 |
|
247 | | - @utils.copy_doc(discord.abc.GuildChannel.permissions_for) |
| 247 | + @copy_doc(discord.abc.GuildChannel.permissions_for) |
248 | 248 | def permissions_for(self, obj: Member | Role, /) -> Permissions: |
249 | 249 | base = super().permissions_for(obj) |
250 | 250 |
|
@@ -295,7 +295,7 @@ async def edit(self, **options) -> _TextChannel: |
295 | 295 | """Edits the channel.""" |
296 | 296 | raise NotImplementedError |
297 | 297 |
|
298 | | - @utils.copy_doc(discord.abc.GuildChannel.clone) |
| 298 | + @copy_doc(discord.abc.GuildChannel.clone) |
299 | 299 | async def clone(self, *, name: str | None = None, reason: str | None = None) -> TextChannel: |
300 | 300 | return await self._clone_impl( |
301 | 301 | { |
@@ -1581,7 +1581,7 @@ def voice_states(self) -> dict[int, VoiceState]: |
1581 | 1581 | if value.channel and value.channel.id == self.id |
1582 | 1582 | } |
1583 | 1583 |
|
1584 | | - @utils.copy_doc(discord.abc.GuildChannel.permissions_for) |
| 1584 | + @copy_doc(discord.abc.GuildChannel.permissions_for) |
1585 | 1585 | def permissions_for(self, obj: Member | Role, /) -> Permissions: |
1586 | 1586 | base = super().permissions_for(obj) |
1587 | 1587 |
|
@@ -1945,7 +1945,7 @@ def type(self) -> ChannelType: |
1945 | 1945 | """The channel's Discord type.""" |
1946 | 1946 | return ChannelType.voice |
1947 | 1947 |
|
1948 | | - @utils.copy_doc(discord.abc.GuildChannel.clone) |
| 1948 | + @copy_doc(discord.abc.GuildChannel.clone) |
1949 | 1949 | async def clone(self, *, name: str | None = None, reason: str | None = None) -> VoiceChannel: |
1950 | 1950 | return await self._clone_impl( |
1951 | 1951 | {"bitrate": self.bitrate, "user_limit": self.user_limit}, |
@@ -2481,7 +2481,7 @@ def type(self) -> ChannelType: |
2481 | 2481 | """The channel's Discord type.""" |
2482 | 2482 | return ChannelType.stage_voice |
2483 | 2483 |
|
2484 | | - @utils.copy_doc(discord.abc.GuildChannel.clone) |
| 2484 | + @copy_doc(discord.abc.GuildChannel.clone) |
2485 | 2485 | async def clone(self, *, name: str | None = None, reason: str | None = None) -> StageChannel: |
2486 | 2486 | return await self._clone_impl({}, name=name, reason=reason) |
2487 | 2487 |
|
@@ -2744,7 +2744,7 @@ def is_nsfw(self) -> bool: |
2744 | 2744 | """Checks if the category is NSFW.""" |
2745 | 2745 | return self.nsfw |
2746 | 2746 |
|
2747 | | - @utils.copy_doc(discord.abc.GuildChannel.clone) |
| 2747 | + @copy_doc(discord.abc.GuildChannel.clone) |
2748 | 2748 | async def clone(self, *, name: str | None = None, reason: str | None = None) -> CategoryChannel: |
2749 | 2749 | return await self._clone_impl({"nsfw": self.nsfw}, name=name, reason=reason) |
2750 | 2750 |
|
@@ -2810,7 +2810,7 @@ async def edit(self, *, reason=None, **options): |
2810 | 2810 | # the payload will always be the proper channel payload |
2811 | 2811 | return self.__class__(state=self._state, guild=self.guild, data=payload) # type: ignore |
2812 | 2812 |
|
2813 | | - @utils.copy_doc(discord.abc.GuildChannel.move) |
| 2813 | + @copy_doc(discord.abc.GuildChannel.move) |
2814 | 2814 | async def move(self, **kwargs): |
2815 | 2815 | kwargs.pop("category", None) |
2816 | 2816 | await super().move(**kwargs) |
|
0 commit comments