You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/Channel.md
+24-17Lines changed: 24 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Represents a guild or DM channel within Discord.
13
13
| guild_id? | snowflake | the id of the guild |
14
14
| position? | integer | sorting position of the channel |
15
15
| permission_overwrites? | array of [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | explicit permission overwrites for members and roles |
16
-
| name? |string| the name of the channel (2-100 characters) |
16
+
| name?\*| ?string | the name of the channel (2-100 characters) |
| name | string | 2-100 character channel name | Text, News, Store, Voice, Category |
636
-
| type | integer | the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types); only conversion between text and news is supported and only in guilds with the "NEWS" feature | Text, News |
637
-
| position | ?integer | the position of the channel in the left-hand listing | Text, News, Store, Voice, Category |
| nsfw | ?boolean | whether the channel is nsfw | Text, News, Store |
640
-
| rate_limit_per_user | ?integer | amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected | Text |
641
-
| bitrate | ?integer | the bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) | Voice |
642
-
| user_limit | ?integer | the user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit | Voice |
643
-
| permission_overwrites | ?array of [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | channel or category-specific permissions | Text, News, Store, Voice, Category |
644
-
| parent_id | ?snowflake | id of the new parent category for a channel | Text, News, Store, Voice |
645
-
| icon | ?[image data](#DOCS_REFERENCE/image-data)| image for the channel icon | Group DM |
| name | ?string | 2-100 character channel name | Group DM, Text, News, Store, Voice, Category |
640
+
| type | integer | the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types); only conversion between text and news is supported and only in guilds with the "NEWS" feature | Text, News |
641
+
| position | ?integer | the position of the channel in the left-hand listing | Text, News, Store, Voice, Category |
| nsfw | ?boolean | whether the channel is nsfw | Text, News, Store |
644
+
| rate_limit_per_user | ?integer | amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected | Text |
645
+
| bitrate | ?integer | the bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) | Voice |
646
+
| user_limit | ?integer | the user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit | Voice |
647
+
| permission_overwrites | ?array of [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | channel or category-specific permissions | Text, News, Store, Voice, Category |
648
+
| parent_id | ?snowflake | id of the new parent category for a channel | Text, News, Store, Voice |
649
+
| icon | ?[image data](#DOCS_REFERENCE/image-data)| image for the channel icon | Group DM |
650
+
651
+
> warn
652
+
> The `name` field is only nullable for group DM channels and passing it as `null` for any other channel type will result in a 400 BAD REQUEST.
Delete a channel, or close a private message. Requires the `MANAGE_CHANNELS` permission for the guild. Deleting a category does not delete its child channels; they will have their `parent_id` removed and a [Channel Update](#DOCS_TOPICS_GATEWAY/channel-update) Gateway event will fire for each of them. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object on success. Fires a [Channel Delete](#DOCS_TOPICS_GATEWAY/channel-delete) Gateway event.
656
+
Delete a channel, or close a private message. Requires the `MANAGE_CHANNELS` permission for the guild. Deleting a category does not delete its child channels; they will have their `parent_id` removed and a [Channel Update](#DOCS_TOPICS_GATEWAY/channel-update) Gateway event will fire for each of them. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object on success. Fires a [Channel Delete](#DOCS_TOPICS_GATEWAY/channel-delete) Gateway event for all channel types except group DMs.
650
657
651
658
> warn
652
659
> Deleting a guild channel cannot be undone. Use this with caution, as it is impossible to undo this action when performed on a guild channel. In contrast, when used with a private message, it is possible to undo the action by opening a private message with the recipient again.
0 commit comments