@@ -40,9 +40,8 @@ def get_component(self, custom_id: str) -> Optional[Component]:
4040 return component
4141
4242 async def disable_components (self ) -> None :
43- disabled_components = [row .disable_components () for row in self .components ]
4443 await self .edit (
45- components = disabled_components ,
44+ components = [ row . disable_components () for row in self . components ] ,
4645 )
4746
4847 async def edit (
@@ -67,9 +66,7 @@ async def edit(
6766 data ["content" ] = content
6867
6968 if embed is not None and embeds is not None :
70- raise InvalidArgument (
71- "cannot pass both embed and embeds parameter to edit()"
72- )
69+ raise InvalidArgument ("cannot pass both embed and embeds parameter to edit()" )
7370
7471 if embed is not None :
7572 data ["embeds" ] = [embed .to_dict ()]
@@ -83,16 +80,11 @@ async def edit(
8380 data ["flags" ] = flags .value
8481
8582 if allowed_mentions is None :
86- if (
87- state .allowed_mentions is not None
88- and self .author .id == self ._state .self_id
89- ):
83+ if state .allowed_mentions is not None and self .author .id == self ._state .self_id :
9084 data ["allowed_mentions" ] = state .allowed_mentions .to_dict ()
9185 else :
9286 if state .allowed_mentions is not None :
93- data ["allowed_mentions" ] = state .allowed_mentions .merge (
94- allowed_mentions
95- ).to_dict ()
87+ data ["allowed_mentions" ] = state .allowed_mentions .merge (allowed_mentions ).to_dict ()
9688 else :
9789 data ["allowed_mentions" ] = allowed_mentions .to_dict ()
9890
@@ -253,9 +245,7 @@ async def send(
253245
254246 elif embeds is not None :
255247 if len (embeds ) > 10 :
256- raise InvalidArgument (
257- "embeds parameter must be a list of up to 10 elements"
258- )
248+ raise InvalidArgument ("embeds parameter must be a list of up to 10 elements" )
259249 embeds = [embed .to_dict () for embed in embeds ]
260250
261251 if stickers is not None :
0 commit comments