Constructor
new MediaChannel()
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
availableTags |
Array.<Object>
|
The available tags that can be applied to threads in the channel. See the official Discord API documentation entry for object structure (max 20) |
|
defaultAutoArchiveDuration |
Number
|
The default duration of newly created threads in minutes to automatically archive the thread after inactivity (60, 1440, 4320, 10080) |
|
defaultReactionEmoji |
Object
|
The emoji to show in the add reaction button on a thread in the channel |
|
defaultSortOrder |
Number
|
The default sort order type used to order posts in the channel |
|
defaultThreadRateLimitPerUser |
Number
|
The initial rateLimitPerUser to set on newly created threads in the channel |
|
lastMessageID |
String
|
<nullable> |
The ID of the most recently created thread in the channel. This can be null if there has never been a thread in this channel |
nsfw |
Boolean
|
Whether the channel is an NSFW channel or not |
|
permissionOverwrites |
Collection.<PermissionOverwrite>
|
Collection of PermissionOverwrites in the channel |
|
position |
Number
|
The position of the channel |
|
rateLimitPerUser |
Number
|
<nullable> |
The time in seconds a user has to wait before sending another message (0-21600) (does not affect bots or users with manageMessages/manageChannel permissions) |
threads |
Array.<PublicThreadChannel>
|
An array of threads in the channel |
|
topic |
String
|
<nullable> |
The topic of the channel |
- Source:
Extends
Methods
createInvite(optionsopt, reasonopt) → {Promise.<Invite>}
Create an invite for the channel
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
<optional> |
Invite generation options
|
||||||||||||||||||||
reason |
String
|
<optional> |
The reason to be displayed in audit logs |
Returns:
- Type:
-
Promise.<Invite>
createThread(options, fileopt) → {Promise.<ThreadChannel>}
Create a thread inside the channel
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
The thread options
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
file |
Object
|
Array.<Object>
|
<optional> |
A file object (or an Array of them)
|
Returns:
- Type:
-
Promise.<ThreadChannel>
createWebhook(options, reasonopt) → {Promise.<Object>}
Create a channel webhook
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
Webhook options
|
|||||||||||||
reason |
String
|
<optional> |
The reason to be displayed in audit logs |
Returns:
- Type:
-
Promise.<Object>
Resolves with a webhook object
delete(reasonopt) → {Promise.<(CategoryChannel|ForumChannel|NewsChannel|NewsThreadChannel|PrivateThreadChannel|PublicThreadChannel|TextChannel|VoiceChannel)>}
Delete the channel
- Overrides:
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
reason |
String
|
<optional> |
The reason to be displayed in audit logs |
Returns:
deletePermission(overwriteID, reasonopt) → {Promise}
Delete a channel permission overwrite
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
overwriteID |
String
|
The ID of the overwritten user or role |
|
reason |
String
|
<optional> |
The reason to be displayed in audit logs |
Returns:
- Type:
-
Promise
edit(options, reasonopt) → {Promise.<(CategoryChannel|ForumChannel|NewsChannel|NewsThreadChannel|PrivateThreadChannel|PublicThreadChannel|TextChannel|VoiceChannel)>}
Edit the channel's properties
- Overrides:
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
The properties to edit
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reason |
String
|
<optional> |
The reason to be displayed in audit logs |
Returns:
editPermission(overwriteID, allow, deny, type, reasonopt) → {Promise.<PermissionOverwrite>}
Create a channel permission overwrite
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
overwriteID |
String
|
The ID of the overwritten user or role |
|
allow |
BigInt
|
Number
|
String
|
The permissions number for allowed permissions |
|
deny |
BigInt
|
Number
|
String
|
The permissions number for denied permissions |
|
type |
Number
|
The object type of the overwrite, either 1 for "member" or 0 for "role" |
|
reason |
String
|
<optional> |
The reason to be displayed in audit logs |
Returns:
- Type:
-
Promise.<PermissionOverwrite>
getArchivedThreads(optionsopt) → {Promise.<Object>}
Get all archived threads in the channel
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
<optional> |
Additional options when requesting archived threads
|
Returns:
- Type:
-
Promise.<Object>
An object containing an array of threads, an array of members and whether the response hasMore threads that could be returned in a subsequent call
getInvites() → {Promise.<Array.<Invite>>}
Get all invites in the channel
- Source:
Returns:
- Type:
-
Promise.<Array.<Invite>>
getWebhooks() → {Promise.<Array.<Object>>}
Get all the webhooks in the channel
- Source:
Returns:
- Type:
-
Promise.<Array.<Object>>
Resolves with an array of webhook objects
permissionsOf(memberID) → {Permission}
Get the channel-specific permissions of a member
- Overrides:
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
memberID |
String
|
Member
|
Object
|
The ID of the member or a Member object |
Returns:
- Type:
-
Permission