@@ -1130,6 +1130,8 @@ async def create_text_channel(
1130
1130
slowmode_delay : int = MISSING ,
1131
1131
nsfw : bool = MISSING ,
1132
1132
overwrites : dict [Role | Member , PermissionOverwrite ] = MISSING ,
1133
+ default_thread_slowmode_delay : int | None = MISSING ,
1134
+ default_auto_archive_duration : int = MISSING ,
1133
1135
) -> TextChannel :
1134
1136
"""|coro|
1135
1137
@@ -1172,6 +1174,16 @@ async def create_text_channel(
1172
1174
reason: Optional[:class:`str`]
1173
1175
The reason for creating this channel. Shows up on the audit log.
1174
1176
1177
+ default_thread_slowmode_delay: Optional[:class:`int`]
1178
+ The initial slowmode delay to set on newly created threads in this channel.
1179
+
1180
+ .. versionadded:: 2.7
1181
+
1182
+ default_auto_archive_duration: :class:`int`
1183
+ The default auto archive duration in minutes for threads created in this channel.
1184
+
1185
+ .. versionadded:: 2.7
1186
+
1175
1187
Returns
1176
1188
-------
1177
1189
:class:`TextChannel`
@@ -1219,6 +1231,12 @@ async def create_text_channel(
1219
1231
1220
1232
if nsfw is not MISSING :
1221
1233
options ["nsfw" ] = nsfw
1234
+
1235
+ if default_thread_slowmode_delay is not MISSING :
1236
+ options ["default_thread_slowmode_delay" ] = default_thread_slowmode_delay
1237
+
1238
+ if default_auto_archive_duration is not MISSING :
1239
+ options ["default_auto_archive_duration" ] = default_auto_archive_duration
1222
1240
1223
1241
data = await self ._create_channel (
1224
1242
name ,
@@ -1246,6 +1264,8 @@ async def create_voice_channel(
1246
1264
rtc_region : VoiceRegion | None = MISSING ,
1247
1265
video_quality_mode : VideoQualityMode = MISSING ,
1248
1266
overwrites : dict [Role | Member , PermissionOverwrite ] = MISSING ,
1267
+ slowmode_delay : int = MISSING ,
1268
+ nsfw : bool = MISSING ,
1249
1269
) -> VoiceChannel :
1250
1270
"""|coro|
1251
1271
@@ -1280,6 +1300,17 @@ async def create_voice_channel(
1280
1300
reason: Optional[:class:`str`]
1281
1301
The reason for creating this channel. Shows up on the audit log.
1282
1302
1303
+ slowmode_delay: :class:`int`
1304
+ Specifies the slowmode rate limit for user in this channel, in seconds.
1305
+ The maximum value possible is `21600`.
1306
+
1307
+ .. versionadded:: 2.7
1308
+
1309
+ nsfw: :class:`bool`
1310
+ To mark the channel as NSFW or not.
1311
+
1312
+ .. versionadded:: 2.7
1313
+
1283
1314
Returns
1284
1315
-------
1285
1316
:class:`VoiceChannel`
@@ -1310,6 +1341,12 @@ async def create_voice_channel(
1310
1341
if video_quality_mode is not MISSING :
1311
1342
options ["video_quality_mode" ] = video_quality_mode .value
1312
1343
1344
+ if slowmode_delay is not MISSING :
1345
+ options ["rate_limit_per_user" ] = slowmode_delay
1346
+
1347
+ if nsfw is not MISSING :
1348
+ options ["nsfw" ] = nsfw
1349
+
1313
1350
data = await self ._create_channel (
1314
1351
name ,
1315
1352
overwrites = overwrites ,
@@ -1333,6 +1370,12 @@ async def create_stage_channel(
1333
1370
overwrites : dict [Role | Member , PermissionOverwrite ] = MISSING ,
1334
1371
category : CategoryChannel | None = None ,
1335
1372
reason : str | None = None ,
1373
+ bitrate : int = MISSING ,
1374
+ user_limit : int = MISSING ,
1375
+ rtc_region : VoiceRegion | None = MISSING ,
1376
+ video_quality_mode : VideoQualityMode = MISSING ,
1377
+ slowmode_delay : int = MISSING ,
1378
+ nsfw : bool = MISSING ,
1336
1379
) -> StageChannel :
1337
1380
"""|coro|
1338
1381
@@ -1358,6 +1401,39 @@ async def create_stage_channel(
1358
1401
reason: Optional[:class:`str`]
1359
1402
The reason for creating this channel. Shows up on the audit log.
1360
1403
1404
+
1405
+ bitrate: :class:`int`
1406
+ The channel's preferred audio bitrate in bits per second.
1407
+
1408
+ .. versionadded:: 2.7
1409
+
1410
+ user_limit: :class:`int`
1411
+ The channel's limit for number of members that can be in a voice channel.
1412
+
1413
+ .. versionadded:: 2.7
1414
+
1415
+ rtc_region: Optional[:class:`VoiceRegion`]
1416
+ The region for the voice channel's voice communication.
1417
+ A value of ``None`` indicates automatic voice region detection.
1418
+
1419
+ .. versionadded:: 2.7
1420
+
1421
+ video_quality_mode: :class:`VideoQualityMode`
1422
+ The camera video quality for the voice channel's participants.
1423
+
1424
+ .. versionadded:: 2.7
1425
+
1426
+ slowmode_delay: :class:`int`
1427
+ Specifies the slowmode rate limit for user in this channel, in seconds.
1428
+ The maximum value possible is `21600`.
1429
+
1430
+ .. versionadded:: 2.7
1431
+
1432
+ nsfw: :class:`bool`
1433
+ To mark the channel as NSFW or not.
1434
+
1435
+ .. versionadded:: 2.7
1436
+
1361
1437
Returns
1362
1438
-------
1363
1439
:class:`StageChannel`
@@ -1379,6 +1455,24 @@ async def create_stage_channel(
1379
1455
if position is not MISSING :
1380
1456
options ["position" ] = position
1381
1457
1458
+ if bitrate is not MISSING :
1459
+ options ["bitrate" ] = bitrate
1460
+
1461
+ if user_limit is not MISSING :
1462
+ options ["user_limit" ] = user_limit
1463
+
1464
+ if rtc_region is not MISSING :
1465
+ options ["rtc_region" ] = None if rtc_region is None else str (rtc_region )
1466
+
1467
+ if video_quality_mode is not MISSING :
1468
+ options ["video_quality_mode" ] = video_quality_mode .value
1469
+
1470
+ if slowmode_delay is not MISSING :
1471
+ options ["rate_limit_per_user" ] = slowmode_delay
1472
+
1473
+ if nsfw is not MISSING :
1474
+ options ["nsfw" ] = nsfw
1475
+
1382
1476
data = await self ._create_channel (
1383
1477
name ,
1384
1478
overwrites = overwrites ,
@@ -1405,6 +1499,10 @@ async def create_forum_channel(
1405
1499
nsfw : bool = MISSING ,
1406
1500
overwrites : dict [Role | Member , PermissionOverwrite ] = MISSING ,
1407
1501
default_reaction_emoji : GuildEmoji | int | str = MISSING ,
1502
+ available_tags : list [ForumTag ] = MISSING ,
1503
+ default_sort_order : SortOrder | None = MISSING ,
1504
+ default_thread_slowmode_delay : int | None = MISSING ,
1505
+ default_auto_archive_duration : int = MISSING ,
1408
1506
) -> ForumChannel :
1409
1507
"""|coro|
1410
1508
@@ -1453,6 +1551,26 @@ async def create_forum_channel(
1453
1551
1454
1552
.. versionadded:: v2.5
1455
1553
1554
+ available_tags: List[:class:`ForumTag`]
1555
+ The set of tags that can be used in a forum channel.
1556
+
1557
+ .. versionadded:: 2.7
1558
+
1559
+ default_sort_order: Optional[:class:`SortOrder`]
1560
+ The default sort order type used to order posts in this channel.
1561
+
1562
+ .. versionadded:: 2.7
1563
+
1564
+ default_thread_slowmode_delay: Optional[:class:`int`]
1565
+ The initial slowmode delay to set on newly created threads in this channel.
1566
+
1567
+ .. versionadded:: 2.7
1568
+
1569
+ default_auto_archive_duration: :class:`int`
1570
+ The default auto archive duration in minutes for threads created in this channel.
1571
+
1572
+ .. versionadded:: 2.7
1573
+
1456
1574
Returns
1457
1575
-------
1458
1576
:class:`ForumChannel`
@@ -1491,15 +1609,27 @@ async def create_forum_channel(
1491
1609
options = {}
1492
1610
if position is not MISSING :
1493
1611
options ["position" ] = position
1494
-
1612
+
1495
1613
if topic is not MISSING :
1496
1614
options ["topic" ] = topic
1497
-
1615
+
1498
1616
if slowmode_delay is not MISSING :
1499
1617
options ["rate_limit_per_user" ] = slowmode_delay
1500
-
1618
+
1501
1619
if nsfw is not MISSING :
1502
1620
options ["nsfw" ] = nsfw
1621
+
1622
+ if available_tags is not MISSING :
1623
+ options ["available_tags" ] = [tag .to_dict () for tag in available_tags ]
1624
+
1625
+ if default_sort_order is not MISSING :
1626
+ options ["default_sort_order" ] = default_sort_order .value if default_sort_order else None
1627
+
1628
+ if default_thread_slowmode_delay is not MISSING :
1629
+ options ["default_thread_slowmode_delay" ] = default_thread_slowmode_delay
1630
+
1631
+ if default_auto_archive_duration is not MISSING :
1632
+ options ["default_auto_archive_duration" ] = default_auto_archive_duration
1503
1633
1504
1634
if default_reaction_emoji is not MISSING :
1505
1635
if isinstance (
0 commit comments