7777T = TypeVar ('T' , bound = VoiceProtocol )
7878
7979if TYPE_CHECKING :
80- from typing_extensions import Self
80+ from typing_extensions import Self , Unpack
8181
8282 from .client import Client
8383 from .user import ClientUser
112112 from .types .snowflake import (
113113 SnowflakeList ,
114114 )
115+ from .permissions import _PermissionOverwriteKwargs
115116
116117 PartialMessageableChannel = Union [TextChannel , VoiceChannel , StageChannel , Thread , DMChannel , PartialMessageable ]
117118 MessageableChannel = Union [PartialMessageableChannel , GroupChannel ]
118- SnowflakeTime = Union [" Snowflake" , datetime ]
119+ SnowflakeTime = Union [' Snowflake' , datetime ]
119120
120121 class PinnedMessage (Message ):
121122 pinned_at : datetime
@@ -139,7 +140,7 @@ def __init__(self, iterator: AsyncIterator[PinnedMessage]) -> None:
139140
140141 def __await__ (self ) -> Generator [Any , None , List [PinnedMessage ]]:
141142 warnings .warn (
142- " `await <channel>.pins()` is deprecated; use `async for message in <channel>.pins()` instead." ,
143+ ' `await <channel>.pins()` is deprecated; use `async for message in <channel>.pins()` instead.' ,
143144 DeprecationWarning ,
144145 stacklevel = 2 ,
145146 )
@@ -422,8 +423,7 @@ class GuildChannel:
422423
423424 if TYPE_CHECKING :
424425
425- def __init__ (self , * , state : ConnectionState , guild : Guild , data : GuildChannelPayload ):
426- ...
426+ def __init__ (self , * , state : ConnectionState , guild : Guild , data : GuildChannelPayload ): ...
427427
428428 def __str__ (self ) -> str :
429429 return self .name
@@ -793,7 +793,6 @@ def permissions_for(self, obj: Union[Member, Role], /) -> Permissions:
793793
794794 default = self .guild .default_role
795795 if default is None :
796-
797796 if self ._state .self_id == obj .id :
798797 return Permissions ._user_installed_permissions (in_guild = True )
799798 else :
@@ -906,26 +905,24 @@ async def set_permissions(
906905 * ,
907906 overwrite : Optional [Union [PermissionOverwrite , _Undefined ]] = ...,
908907 reason : Optional [str ] = ...,
909- ) -> None :
910- ...
908+ ) -> None : ...
911909
912910 @overload
913911 async def set_permissions (
914912 self ,
915913 target : Union [Member , Role ],
916914 * ,
917915 reason : Optional [str ] = ...,
918- ** permissions : Optional [bool ],
919- ) -> None :
920- ...
916+ ** permissions : Unpack [_PermissionOverwriteKwargs ],
917+ ) -> None : ...
921918
922919 async def set_permissions (
923920 self ,
924921 target : Union [Member , Role ],
925922 * ,
926923 overwrite : Any = _undefined ,
927924 reason : Optional [str ] = None ,
928- ** permissions : Optional [ bool ],
925+ ** permissions : Unpack [ _PermissionOverwriteKwargs ],
929926 ) -> None :
930927 r"""|coro|
931928
@@ -1108,8 +1105,7 @@ async def move(
11081105 category : Optional [Snowflake ] = MISSING ,
11091106 sync_permissions : bool = MISSING ,
11101107 reason : Optional [str ] = MISSING ,
1111- ) -> None :
1112- ...
1108+ ) -> None : ...
11131109
11141110 @overload
11151111 async def move (
@@ -1120,8 +1116,7 @@ async def move(
11201116 category : Optional [Snowflake ] = MISSING ,
11211117 sync_permissions : bool = MISSING ,
11221118 reason : str = MISSING ,
1123- ) -> None :
1124- ...
1119+ ) -> None : ...
11251120
11261121 @overload
11271122 async def move (
@@ -1132,8 +1127,7 @@ async def move(
11321127 category : Optional [Snowflake ] = MISSING ,
11331128 sync_permissions : bool = MISSING ,
11341129 reason : str = MISSING ,
1135- ) -> None :
1136- ...
1130+ ) -> None : ...
11371131
11381132 @overload
11391133 async def move (
@@ -1144,8 +1138,7 @@ async def move(
11441138 category : Optional [Snowflake ] = MISSING ,
11451139 sync_permissions : bool = MISSING ,
11461140 reason : str = MISSING ,
1147- ) -> None :
1148- ...
1141+ ) -> None : ...
11491142
11501143 async def move (self , ** kwargs : Any ) -> None :
11511144 """|coro|
@@ -1427,8 +1420,7 @@ async def send(
14271420 view : LayoutView ,
14281421 suppress_embeds : bool = ...,
14291422 silent : bool = ...,
1430- ) -> Message :
1431- ...
1423+ ) -> Message : ...
14321424
14331425 @overload
14341426 async def send (
@@ -1443,8 +1435,7 @@ async def send(
14431435 view : LayoutView ,
14441436 suppress_embeds : bool = ...,
14451437 silent : bool = ...,
1446- ) -> Message :
1447- ...
1438+ ) -> Message : ...
14481439
14491440 @overload
14501441 async def send (
@@ -1464,8 +1455,7 @@ async def send(
14641455 suppress_embeds : bool = ...,
14651456 silent : bool = ...,
14661457 poll : Poll = ...,
1467- ) -> Message :
1468- ...
1458+ ) -> Message : ...
14691459
14701460 @overload
14711461 async def send (
@@ -1485,8 +1475,7 @@ async def send(
14851475 suppress_embeds : bool = ...,
14861476 silent : bool = ...,
14871477 poll : Poll = ...,
1488- ) -> Message :
1489- ...
1478+ ) -> Message : ...
14901479
14911480 @overload
14921481 async def send (
@@ -1506,8 +1495,7 @@ async def send(
15061495 suppress_embeds : bool = ...,
15071496 silent : bool = ...,
15081497 poll : Poll = ...,
1509- ) -> Message :
1510- ...
1498+ ) -> Message : ...
15111499
15121500 @overload
15131501 async def send (
@@ -1527,8 +1515,7 @@ async def send(
15271515 suppress_embeds : bool = ...,
15281516 silent : bool = ...,
15291517 poll : Poll = ...,
1530- ) -> Message :
1531- ...
1518+ ) -> Message : ...
15321519
15331520 async def send (
15341521 self ,
@@ -2030,7 +2017,7 @@ async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Op
20302017 if limit is None :
20312018 raise ValueError ('history does not support around with limit=None' )
20322019 if limit > 101 :
2033- raise ValueError (" history max limit 101 when specifying around parameter" )
2020+ raise ValueError (' history max limit 101 when specifying around parameter' )
20342021
20352022 # Strange Discord quirk
20362023 limit = 100 if limit == 101 else limit
0 commit comments