@@ -302,7 +302,7 @@ async def modify(
302302 :type parent_id: Optional[int]
303303 :param nsfw?: Whether the channel is nsfw or not, defaults to the current value of the channel
304304 :type nsfw: Optional[bool]
305- :param reason: The reason for the edit
305+ :param reason? : The reason for the edit
306306 :type reason: Optional[str]
307307 :return: The modified channel as new object
308308 :rtype: Channel
@@ -339,6 +339,164 @@ async def modify(
339339 )
340340 return Channel (** res , _client = self ._client )
341341
342+ async def set_name (
343+ self ,
344+ name : str ,
345+ * ,
346+ reason : Optional [str ] = None ,
347+ ) -> "Channel" :
348+ """
349+ Sets the name of the channel.
350+
351+ :param name: The new name of the channel
352+ :type name: str
353+ :param reason?: The reason of the edit
354+ :type reason: Optional[str]
355+ :return: The edited channel
356+ :rtype: Channel
357+ """
358+
359+ return await self .modify (name = name , reason = reason )
360+
361+ async def set_topic (
362+ self ,
363+ topic : str ,
364+ * ,
365+ reason : Optional [str ] = None ,
366+ ) -> "Channel" :
367+ """
368+ Sets the topic of the channel.
369+
370+ :param topic: The new topic of the channel
371+ :type topic: str
372+ :param reason?: The reason of the edit
373+ :type reason: Optional[str]
374+ :return: The edited channel
375+ :rtype: Channel
376+ """
377+
378+ return await self .modify (topic = topic , reason = reason )
379+
380+ async def set_bitrate (
381+ self ,
382+ bitrate : int ,
383+ * ,
384+ reason : Optional [str ] = None ,
385+ ) -> "Channel" :
386+ """
387+ Sets the bitrate of the channel.
388+
389+ :param bitrate: The new bitrate of the channel
390+ :type bitrate: int
391+ :param reason?: The reason of the edit
392+ :type reason: Optional[str]
393+ :return: The edited channel
394+ :rtype: Channel
395+ """
396+
397+ if self .type != ChannelType .GUILD_VOICE :
398+ raise TypeError ("Bitrate is only available for VoiceChannels" )
399+
400+ return await self .modify (bitrate = bitrate , reason = reason )
401+
402+ async def set_user_limit (
403+ self ,
404+ user_limit : int ,
405+ * ,
406+ reason : Optional [str ] = None ,
407+ ) -> "Channel" :
408+ """
409+ Sets the user_limit of the channel.
410+
411+ :param user_limit: The new user limit of the channel
412+ :type user_limit: int
413+ :param reason?: The reason of the edit
414+ :type reason: Optional[str]
415+ :return: The edited channel
416+ :rtype: Channel
417+ """
418+
419+ if self .type != ChannelType .GUILD_VOICE :
420+ raise TypeError ("user_limit is only available for VoiceChannels" )
421+
422+ return await self .modify (user_limit = user_limit , reason = reason )
423+
424+ async def set_rate_limit_per_user (
425+ self ,
426+ rate_limit_per_user : int ,
427+ * ,
428+ reason : Optional [str ] = None ,
429+ ) -> "Channel" :
430+ """
431+ Sets the position of the channel.
432+
433+ :param rate_limit_per_user: The new rate_limit_per_user of the channel (0-21600)
434+ :type rate_limit_per_user: int
435+ :param reason?: The reason of the edit
436+ :type reason: Optional[str]
437+ :return: The edited channel
438+ :rtype: Channel
439+ """
440+
441+ return await self .modify (rate_limit_per_user = rate_limit_per_user , reason = reason )
442+
443+ async def set_position (
444+ self ,
445+ position : int ,
446+ * ,
447+ reason : Optional [str ] = None ,
448+ ) -> "Channel" :
449+ """
450+ Sets the position of the channel.
451+
452+ :param position: The new position of the channel
453+ :type position: int
454+ :param reason?: The reason of the edit
455+ :type reason: Optional[str]
456+ :return: The edited channel
457+ :rtype: Channel
458+ """
459+
460+ return await self .modify (position = position , reason = reason )
461+
462+ async def set_parent_id (
463+ self ,
464+ parent_id : int ,
465+ * ,
466+ reason : Optional [str ] = None ,
467+ ) -> "Channel" :
468+ """
469+ Sets the parent_id of the channel.
470+
471+ :param parent_id: The new parent_id of the channel
472+ :type parent_id: int
473+ :param reason?: The reason of the edit
474+ :type reason: Optional[str]
475+ :return: The edited channel
476+ :rtype: Channel
477+ """
478+
479+ return await self .modify (parent_id = parent_id , reason = reason )
480+
481+ async def set_nsfw (
482+ self ,
483+ nsfw : bool ,
484+ * ,
485+ reason : Optional [str ] = None ,
486+ ) -> "Channel" :
487+ """
488+ Sets the nsfw-flag of the channel.
489+
490+ :param nsfw: The new nsfw-flag of the channel
491+ :type nsfw: bool
492+ :param reason?: The reason of the edit
493+ :type reason: Optional[str]
494+ :return: The edited channel
495+ :rtype: Channel
496+ """
497+
498+ return await self .modify (nsfw = nsfw , reason = reason )
499+
342500 async def add_member (
343501 self ,
344502 member_id : int ,
0 commit comments