File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ async def archive_channel( # type: ignore[misc]
239239
240240 if not re .fullmatch (r"\A\d{17,20}\Z" , str_channel_id ):
241241 await self .command_send_error (
242- ctx = ctx , message = f"{ str_category_id !r} is not a valid category ID."
242+ ctx = ctx , message = f"{ str_channel_id !r} is not a valid channel ID."
243243 )
244244 return
245245
@@ -283,6 +283,14 @@ async def archive_channel( # type: ignore[misc]
283283 )
284284 return
285285
286+ if len (category .channels ) >= 50 :
287+ await self .command_send_error (
288+ ctx = ctx ,
289+ message = f"Category with ID { str (category_id )!r} is full. "
290+ "Please select a different category." ,
291+ )
292+ return
293+
286294 await channel .edit (category = category , sync_permissions = True )
287295
288296 await ctx .respond (":white_check_mark: Channel successfully archived" , ephemeral = True )
You can’t perform that action at this time.
0 commit comments