Tags
{channel} Tags
# {channel.mention;channel}
Returns a string with a channel mention.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.id;channel}
Returns the ID of a channel.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.type;channel}
Returns an integer for the channel type.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.createdAt;channel}
Returns a timestamp for the creation date of a channel that can be used with {time}.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.nsfw;channel}
Checks if a channel is marked as NSFW.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.name;channel}
Returns the name of a channel.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.position;channel}
Returns the position of the channel.
Discord sorts channels by their category, then their type, then their position. Two channels can have the same position and a channel at the bottom of the list can have a higher position than a channel at the top of the list, because of the category-first sorting.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.lastMessageId;channel}
Returns the ID of the last message sent in a channel.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.topic;channel}
Returns a channel topic, also known as channel description.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.parentId}
Get the parent ID of the channel. For regular channels this is the category ID. For threads this is the ID of the parent channel.
{channel.parentId} // "", a channel with no parent
{channel.parentId} // "532902705404837888", a regular channel with a parent
{channel.parentId} // "532902728834351115", a thread channel with a parent
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.isThread}
Returns true if the channel is a thread.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.isForum}
Returns true if the channel is a forum channel.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.isVoice}
Returns true if the channel is a voice channel.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.isTextable}
Returns true if the channel can accept messages.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.edit name topic nsfw archived locked ratelimit parent reason auto_archive_duration;channel} mutateChannel
Updates a channel.
| Name | Type | Description |
|---|---|---|
channel | Channel | |
name | string? | The new name of the channel. |
topic | string? | The new topic of the channel. |
nsfw | boolean? | Whether the channel is NSFW or not. |
archived | boolean? | Whether this channel is archived; channel must be a thread. |
locked | boolean? | Whether this thread is locked. |
ratelimit | Time? | How often users can send messages in this channel, for example 1m. |
parent | Channel? | The category to move the channel to. |
reason | string? | An optional reason recorded in the server audit log. |
auto_archive_duration | ThreadAutoArchiveDuration? | How long an inactive thread stays active. |
# {channel.startThread auto_archive_duration ratelimit invitable is_private return_id channel;name;message} mutateChannel
Creates a new thread.
This tag creates regular public or private threads in text and announcement channels. To create a post in a forum or media channel, configure the responder with {responder.forumPost} instead.
| Name | Type | Default | Description |
|---|---|---|---|
name | string | the name of the thread. | |
message | Message? | the message the thread is created from. | |
auto_archive_duration | ThreadAutoArchiveDuration? | ThreadAutoArchiveDuration.OneDay | the time until threads are archived after inactivity. Can be one_hour, one_day, three_days or one_week. |
ratelimit | Time? | how often users can send messages in the thread, for example 1m. | |
invitable | boolean? | whether non-moderators can add other non-moderators to the thread; only available on private threads. | |
is_private | boolean? | false | whether the read is private, must not have a message to be private. |
return_id | boolean? | false | whether to return the ID of the created thread. |
channel | Channel? | context Channel | the channel to create the thread on. |
# {channel.getPins;channel}
Returns a list of pinned message IDs in a channel.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.create name type topic nsfw parent return_id;channel} mutateChannel
Creates a new channel.
| Name | Type | Description |
|---|---|---|
name | string | The name of the channel. |
type | ChannelType | The type of the channel. GuildText, GuildVoice, GuildCategory, and GuildForum are allowed. |
topic | string? | The topic of the channel. |
nsfw | boolean? | Whether the channel is NSFW or not. |
parent | Channel? | The parent channel, if any. |
return_id | boolean? | Whether to return the created channels ID or not. |
# {channel.invite expiry max_uses temporary;channel} mutateChannel
Creates an invite for a channel and returns its URL. By default, the invite never expires, has unlimited uses, and gives permanent membership.
| Name | Type | Default | Description |
|---|---|---|---|
channel | Channel | context Channel | The channel the invite should send people to. |
expiry | Time? | never expires | How long the invite is valid for. Must not exceed 7 days. |
max_uses | number? | 0 | Maximum uses for the invite. Use 0 for unlimited uses; otherwise it must be a whole number to 100. |
temporary | boolean? | false | Whether joining with the invite grants temporary membership. false grants permanent membership. |
reason | string? | An optional reason recorded in the server audit log. |
{channel.invite expiry=1d max_uses=1 temporary=true}
# {channel.delete;channel} mutateChannel
This tag is marked Dangerous and must be enabled in Advanced Settings.
Deletes a channel.
| Name | Type | Description |
|---|---|---|
channel | Channel | The channel to delete |
# {channel.position;channel}
Get the position of a channel.
| Name | Type | Default |
|---|---|---|
channel | Channel | context Channel |
# {channel.purge;limit;channel} mutateMessage
This tag is marked Dangerous and must be enabled in Advanced Settings.
Purge messages from a channel with various parameters.
| Name | Type | Default | Description |
|---|---|---|---|
limit | number? | 100 | The number of messages to purge, applied before filtering. |
channel | Channel? | context Channel | The channel to purge messages in, defaults to the context channel. |
includePinned | boolean? | false | Whether to include pinned messages. |
newerThan | Time? | Messages that are newer than this time will be purged. Accepts a time value. | |
olderThan | Time? | Messages that are older than this time will be purged. Accepts a time value. | |
beforeMessage | Message? | Purge messages sent before this message. | |
afterMessage | Message? | Purge messages sent after this message. | |
including | string? | Purge messages including this message. Can be a regex pattern. | |
excluding | string? | Purge messages excluding this message. Can be a regex pattern. | |
author | User? | Purge messages that were sent by this user. | |
notAuthor | User? | Purge messages that were not sent by this user. | |
hasImage | boolean? | Purge messages that do or do not contain an image. | |
hasLink | boolean? | Purge messages that do or do not contain a link. | |
hasInvite | boolean? | Purge messages that do or do not contain a server invite. | |
hasAttachment | boolean? | Purge messages that do or do not have an attachment. | |
reason | string? | The reason for deleting the channel. | |
returnBool | boolean? | false | Whether to return true if messages were purged. |