@@ -61,7 +61,9 @@ async def edit(
6161 data ["content" ] = content
6262
6363 if embed is not None and embeds is not None :
64- raise InvalidArgument ("cannot pass both embed and embeds parameter to edit()" )
64+ raise InvalidArgument (
65+ "cannot pass both embed and embeds parameter to edit()"
66+ )
6567
6668 if embed is not None :
6769 data ["embeds" ] = [embed .to_dict ()]
@@ -75,11 +77,16 @@ async def edit(
7577 data ["flags" ] = flags .value
7678
7779 if allowed_mentions is None :
78- if state .allowed_mentions is not None and self .author .id == self ._state .self_id :
80+ if (
81+ state .allowed_mentions is not None
82+ and self .author .id == self ._state .self_id
83+ ):
7984 data ["allowed_mentions" ] = state .allowed_mentions .to_dict ()
8085 else :
8186 if state .allowed_mentions is not None :
82- data ["allowed_mentions" ] = state .allowed_mentions .merge (allowed_mentions ).to_dict ()
87+ data ["allowed_mentions" ] = state .allowed_mentions .merge (
88+ allowed_mentions
89+ ).to_dict ()
8390 else :
8491 data ["allowed_mentions" ] = allowed_mentions .to_dict ()
8592
@@ -202,7 +209,8 @@ def send_message(
202209 payload ["components" ] = components
203210
204211 return self .request (
205- Route ("POST" , "/channels/{channel_id}/messages" , channel_id = channel_id ), json = payload
212+ Route ("POST" , "/channels/{channel_id}/messages" , channel_id = channel_id ),
213+ json = payload ,
206214 )
207215
208216
@@ -239,7 +247,9 @@ async def send(
239247
240248 elif embeds is not None :
241249 if len (embeds ) > 10 :
242- raise InvalidArgument ("embeds parameter must be a list of up to 10 elements" )
250+ raise InvalidArgument (
251+ "embeds parameter must be a list of up to 10 elements"
252+ )
243253 embeds = [embed .to_dict () for embed in embeds ]
244254
245255 if stickers is not None :
@@ -344,7 +354,7 @@ async def send_override(context_or_channel, *args, **kwargs):
344354 return await send (channel , * args , ** kwargs )
345355
346356
347- async def fetch_message (context_or_channel , id :int ):
357+ async def fetch_message (context_or_channel , id : int ):
348358 if isinstance (context_or_channel , Context ):
349359 channel = context_or_channel .channel
350360 else :
@@ -356,4 +366,4 @@ async def fetch_message(context_or_channel, id:int):
356366
357367
358368Messageable .send = send_override
359- Messageable .fetch_message = fetch_message
369+ Messageable .fetch_message = fetch_message
0 commit comments