@@ -33,7 +33,7 @@ async def get_channel(self, channel_id: "Snowflake_Type") -> discord_typings.Cha
3333 channel
3434
3535 """
36- result = await self .request (Route ("GET" , f "/channels/{ int ( channel_id ) } " ))
36+ result = await self .request (Route ("GET" , "/channels/{channel_id}" , channel_id = channel_id ))
3737 return cast (discord_typings .ChannelData , result )
3838
3939 @overload
@@ -109,7 +109,9 @@ async def get_channel_messages(
109109 }
110110 params = dict_filter_none (params )
111111
112- result = await self .request (Route ("GET" , f"/channels/{ int (channel_id )} /messages" ), params = params )
112+ result = await self .request (
113+ Route ("GET" , "/channels/{channel_id}/messages" , channel_id = channel_id ), params = params
114+ )
113115 return cast (list [discord_typings .MessageData ], result )
114116
115117 async def create_guild_channel (
@@ -168,7 +170,9 @@ async def create_guild_channel(
168170 )
169171 payload = dict_filter_none (payload )
170172
171- result = await self .request (Route ("POST" , f"/guilds/{ int (guild_id )} /channels" ), payload = payload , reason = reason )
173+ result = await self .request (
174+ Route ("POST" , "/guilds/{guild_id}/channels" , guild_id = guild_id ), payload = payload , reason = reason
175+ )
172176 return cast (discord_typings .ChannelData , result )
173177
174178 async def move_channel (
@@ -200,7 +204,9 @@ async def move_channel(
200204 }
201205 payload = dict_filter_none (payload )
202206
203- await self .request (Route ("PATCH" , f"/guilds/{ int (guild_id )} /channels" ), payload = payload , reason = reason )
207+ await self .request (
208+ Route ("PATCH" , "/guilds/{guild_id}/channels" , guild_id = guild_id ), payload = payload , reason = reason
209+ )
204210
205211 async def modify_channel (
206212 self , channel_id : "Snowflake_Type" , data : dict , reason : str | None = None
@@ -217,7 +223,9 @@ async def modify_channel(
217223 Channel object on success
218224
219225 """
220- result = await self .request (Route ("PATCH" , f"/channels/{ int (channel_id )} " ), payload = data , reason = reason )
226+ result = await self .request (
227+ Route ("PATCH" , "/channels/{channel_id}" , channel_id = channel_id ), payload = data , reason = reason
228+ )
221229 return cast (discord_typings .ChannelData , result )
222230
223231 async def delete_channel (self , channel_id : "Snowflake_Type" , reason : str | None = None ) -> None :
@@ -229,7 +237,7 @@ async def delete_channel(self, channel_id: "Snowflake_Type", reason: str | None
229237 reason: An optional reason for the audit log
230238
231239 """
232- await self .request (Route ("DELETE" , f "/channels/{ int ( channel_id ) } " ), reason = reason )
240+ await self .request (Route ("DELETE" , "/channels/{channel_id}" , channel_id = channel_id ), reason = reason )
233241
234242 async def get_channel_invites (self , channel_id : "Snowflake_Type" ) -> list [discord_typings .InviteData ]:
235243 """
@@ -242,7 +250,7 @@ async def get_channel_invites(self, channel_id: "Snowflake_Type") -> list[discor
242250 List of invite objects
243251
244252 """
245- result = await self .request (Route ("GET" , f "/channels/{ int ( channel_id ) } /invites" ))
253+ result = await self .request (Route ("GET" , "/channels/{channel_id}/invites" , channel_id = channel_id ))
246254 return cast (list [discord_typings .InviteData ], result )
247255
248256 @overload
@@ -336,7 +344,7 @@ async def create_channel_invite(
336344 payload = dict_filter_none (payload )
337345
338346 result = await self .request (
339- Route ("POST" , f "/channels/{ int ( channel_id ) } /invites" ), payload = payload , reason = reason
347+ Route ("POST" , "/channels/{channel_id}/invites" , channel_id = channel_id ), payload = payload , reason = reason
340348 )
341349 return cast (discord_typings .InviteData , result )
342350
@@ -361,13 +369,14 @@ async def get_invite(
361369
362370 """
363371 params : PAYLOAD_TYPE = {
372+ "invite_code" : invite_code ,
364373 "with_counts" : with_counts ,
365374 "with_expiration" : with_expiration ,
366375 "guild_scheduled_event_id" : int (scheduled_event_id ) if scheduled_event_id else None ,
367376 }
368377 params = dict_filter_none (params )
369378
370- result = await self .request (Route ("GET" , f "/invites/{ invite_code } " , params = params ))
379+ result = await self .request (Route ("GET" , "/invites/{invite_code}" , params = params ))
371380 return cast (discord_typings .InviteData , result )
372381
373382 async def delete_invite (self , invite_code : str , reason : str | None = None ) -> discord_typings .InviteData :
@@ -382,7 +391,7 @@ async def delete_invite(self, invite_code: str, reason: str | None = None) -> di
382391 The deleted invite object
383392
384393 """
385- result = await self .request (Route ("DELETE" , f "/invites/{ invite_code } " ), reason = reason )
394+ result = await self .request (Route ("DELETE" , "/invites/{invite_code}" , invite_code = invite_code ), reason = reason )
386395 return cast (discord_typings .InviteData , result )
387396
388397 async def edit_channel_permission (
@@ -409,7 +418,12 @@ async def edit_channel_permission(
409418 payload : PAYLOAD_TYPE = {"allow" : allow , "deny" : deny , "type" : perm_type }
410419
411420 await self .request (
412- Route ("PUT" , f"/channels/{ int (channel_id )} /permissions/{ int (overwrite_id )} " ),
421+ Route (
422+ "PUT" ,
423+ "/channels/{channel_id}/permissions/{overwrite_id}" ,
424+ channel_id = channel_id ,
425+ overwrite_id = overwrite_id ,
426+ ),
413427 payload = payload ,
414428 reason = reason ,
415429 )
@@ -429,7 +443,10 @@ async def delete_channel_permission(
429443 reason: An optional reason for the audit log
430444
431445 """
432- await self .request (Route ("DELETE" , f"/channels/{ int (channel_id )} /{ int (overwrite_id )} " ), reason = reason )
446+ await self .request (
447+ Route ("DELETE" , "/channels/{channel_id}/{overwrite_id}" , channel_id = channel_id , overwrite_id = overwrite_id ),
448+ reason = reason ,
449+ )
433450
434451 async def follow_news_channel (
435452 self , channel_id : "Snowflake_Type" , webhook_channel_id : "Snowflake_Type"
@@ -447,7 +464,9 @@ async def follow_news_channel(
447464 """
448465 payload = {"webhook_channel_id" : int (webhook_channel_id )}
449466
450- result = await self .request (Route ("POST" , f"/channels/{ int (channel_id )} /followers" ), payload = payload )
467+ result = await self .request (
468+ Route ("POST" , "/channels/{channel_id}/followers" , channel_id = channel_id ), payload = payload
469+ )
451470 return cast (discord_typings .FollowedChannelData , result )
452471
453472 async def trigger_typing_indicator (self , channel_id : "Snowflake_Type" ) -> None :
@@ -458,7 +477,7 @@ async def trigger_typing_indicator(self, channel_id: "Snowflake_Type") -> None:
458477 channel_id: The id of the channel to "type" in
459478
460479 """
461- await self .request (Route ("POST" , f "/channels/{ int ( channel_id ) } /typing" ))
480+ await self .request (Route ("POST" , "/channels/{channel_id}/typing" , channel_id = channel_id ))
462481
463482 async def get_pinned_messages (self , channel_id : "Snowflake_Type" ) -> list [discord_typings .MessageData ]:
464483 """
@@ -471,7 +490,7 @@ async def get_pinned_messages(self, channel_id: "Snowflake_Type") -> list[discor
471490 A list of pinned message objects
472491
473492 """
474- result = await self .request (Route ("GET" , f "/channels/{ int ( channel_id ) } /pins" ))
493+ result = await self .request (Route ("GET" , "/channels/{channel_id}/pins" , channel_id = channel_id ))
475494 return cast (list [discord_typings .MessageData ], result )
476495
477496 async def create_stage_instance (
@@ -514,7 +533,7 @@ async def get_stage_instance(self, channel_id: "Snowflake_Type") -> discord_typi
514533 A stage instance.
515534
516535 """
517- result = await self .request (Route ("GET" , f "/stage-instances/{ int ( channel_id ) } " ))
536+ result = await self .request (Route ("GET" , "/stage-instances/{channel_id}" , channel_id = channel_id ))
518537 return cast (discord_typings .StageInstanceData , result )
519538
520539 async def modify_stage_instance (
@@ -540,7 +559,7 @@ async def modify_stage_instance(
540559 payload : PAYLOAD_TYPE = {"topic" : topic , "privacy_level" : privacy_level }
541560 payload = dict_filter_none (payload )
542561 result = await self .request (
543- Route ("PATCH" , f "/stage-instances/{ int ( channel_id ) } " ), payload = payload , reason = reason
562+ Route ("PATCH" , "/stage-instances/{channel_id}" , channel_id = channel_id ), payload = payload , reason = reason
544563 )
545564 return cast (discord_typings .StageInstanceData , result )
546565
@@ -553,7 +572,7 @@ async def delete_stage_instance(self, channel_id: "Snowflake_Type", reason: str
553572 reason: The reason for the deletion
554573
555574 """
556- await self .request (Route ("DELETE" , f "/stage-instances/{ int ( channel_id ) } " ), reason = reason )
575+ await self .request (Route ("DELETE" , "/stage-instances/{channel_id}" , channel_id = channel_id ), reason = reason )
557576
558577 async def create_tag (
559578 self ,
@@ -582,7 +601,9 @@ async def create_tag(
582601 }
583602 payload = dict_filter_none (payload )
584603
585- result = await self .request (Route ("POST" , f"/channels/{ int (channel_id )} /tags" ), payload = payload )
604+ result = await self .request (
605+ Route ("POST" , "/channels/{channel_id}/tags" , channel_id = channel_id ), payload = payload
606+ )
586607 return cast (discord_typings .ChannelData , result )
587608
588609 async def edit_tag (
@@ -614,7 +635,9 @@ async def edit_tag(
614635 }
615636 payload = dict_filter_none (payload )
616637
617- result = await self .request (Route ("PUT" , f"/channels/{ int (channel_id )} /tags/{ int (tag_id )} " ), payload = payload )
638+ result = await self .request (
639+ Route ("PUT" , "/channels/{channel_id}/tags/{tag_id}" , channel_id = channel_id , tag_id = tag_id ), payload = payload
640+ )
618641 return cast (discord_typings .ChannelData , result )
619642
620643 async def delete_tag (self , channel_id : "Snowflake_Type" , tag_id : "Snowflake_Type" ) -> discord_typings .ChannelData :
@@ -625,5 +648,7 @@ async def delete_tag(self, channel_id: "Snowflake_Type", tag_id: "Snowflake_Type
625648 channel_id: The ID of the forum channel to delete tag it.
626649 tag_id: The ID of the tag to delete
627650 """
628- result = await self .request (Route ("DELETE" , f"/channels/{ int (channel_id )} /tags/{ int (tag_id )} " ))
651+ result = await self .request (
652+ Route ("DELETE" , "/channels/{channel_id}/tags/{tag_id}" , channel_id = channel_id , tag_id = tag_id )
653+ )
629654 return cast (discord_typings .ChannelData , result )
0 commit comments