Table of Contents

Class DiscordChannel

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

Represents a discord channel.

public class DiscordChannel : SnowflakeObject, IEquatable<DiscordChannel>
Inheritance
DiscordChannel
Implements
Derived
Inherited Members
Extension Methods

Properties

AvailableTags

List of available tags for forum posts.

Bitrate

Gets this channel's bitrate. This is applicable to voice channels only.

Children

Gets this channel's children. This applies only to channel categories.

DefaultAutoArchiveDuration

Gets this channel's default duration for newly created threads, in minutes, to automatically archive the thread after recent activity.

DefaultForumLayout

Gets the default forum layout for this channel

DefaultReactionEmoji

List of available tags for forum posts.

DefaultSortOrder
Flags

Gets the flags of this channel.

Guild

Gets the guild to which this channel belongs.

GuildId

Gets ID of the guild to which this channel belongs.

IconEmoji

Gets the icon emoji for this channel. Only visible and configurable on mobile with the new layout.

IsCategory

Gets whether this channel is a channel category.

IsNsfw

Gets whether this channel is an NSFW channel.

IsPrivate

Gets whether this channel is a DM channel.

IsStage

Gets whether this channel is a stage channel.

LastMessageId

Gets the ID of the last message sent in this channel. This is applicable to text channels only.

LastPinTimestamp

Gets when the last pinned message was pinned.

Mention

Gets this channel's mention string.

Name

Gets the name of this channel.

Parent

Gets the category that contains this channel.

ParentId

Gets ID of the category that contains this channel.

PerUserRateLimit

Gets the slow mode delay configured for this channel.

All bots, as well as users with ManageChannels or ManageMessages permissions in the channel are exempt from slow mode.

PermissionOverwrites

Gets a collection of permission overwrites for this channel.

Position

Gets the position of this channel.

PostCreateUserRateLimit

Gets the slow mode delay configured for this channel for post creations.

All bots, as well as users with ManageChannels or ManageMessages permissions in the channel are exempt from slow mode.

QualityMode

Gets this channel's video quality mode. This is applicable to voice channels only.

RtcRegion

Gets this channel's region override (if voice channel).

Template

Gets the template for new posts in this channel. Applicable if forum channel.

ThemeColor
Topic

Gets the channel's topic. This is applicable to text channels only.

Type

Gets the type of this channel.

UserLimit

Gets this channel's user limit. This is applicable to voice channels only.

UserPermissions

Only sent on the resolved channels of interaction responses for application commands. Gets the permissions of the user in this channel who invoked the command.

Users

Gets the list of members currently in the channel (if voice channel), or members who can see the channel (otherwise).

Version

Gets the version number for this channel.

Methods

AddOverwriteAsync(DiscordMember, Permissions, Permissions, string)

Adds a channel permission overwrite for specified member.

AddOverwriteAsync(DiscordRole, Permissions, Permissions, string)

Adds a channel permission overwrite for specified role.

CloneAsync(string)

Clones this channel. This operation will create a channel with identical settings to this one. Note that this will not copy messages or tags.

CloseStageAsync(string)

Closes a stage.

CreateForumPostTagAsync(string, DiscordEmoji, bool, string)

Creates a forum channel tag.

CreateInviteAsync(int, int, bool, bool, TargetType?, ulong?, ulong?, string)

Create a new invite object

CreatePostAsync(string, DiscordMessageBuilder, int?, IEnumerable<ForumPostTag>?, string)

Creates a forum post.

CreateScheduledEventAsync(string, DateTimeOffset, string, Optional<Stream>, DiscordScheduledEventRecurrenceRule?, string)

Creates a scheduled event based on the channel type.

CreateThreadAsync(string, ThreadAutoArchiveDuration, ChannelType, int?, string)

Creates a thread.

CreateWebhookAsync(string, Optional<Stream>, string)

Create a new webhook.

CrosspostMessageAsync(DiscordMessage)

Publishes a message in a news channel to following channels.

DeleteAsync(string)

Deletes a guild channel

DeleteForumPostTag(ulong, string)

Deletes a forum channel tag.

DeleteMessageAsync(DiscordMessage, string)

Deletes a message

DeleteMessagesAsync(IEnumerable<DiscordMessage>, string)

Deletes multiple messages if they are less than 14 days old. If they are older, none of the messages will be deleted and you will receive a BadRequestException error.

DeleteOverwriteAsync(DiscordMember, string)

Deletes a channel permission overwrite for specified member.

DeleteOverwriteAsync(DiscordRole, string)

Deletes a channel permission overwrite for specified role.

Equals(DiscordChannel)

Checks whether this DiscordChannel is equal to another DiscordChannel.

Equals(object)

Checks whether this DiscordChannel is equal to another object.

FollowAsync(DiscordChannel)

Follows a news channel.

GetForumPostTag(ulong)

Gets a forum channel tag.

GetHashCode()

Gets the hash code for this DiscordChannel.

GetInvitesAsync()

Returns a list of invite objects

GetJoinedPrivateArchivedThreadsAsync(ulong?, int?)

Gets joined archived private threads. Can contain more threads. If the result's value 'HasMore' is true, you need to recall this function to get older threads.

GetMaxPosition()

Gets the maximum available position to move the channel to. This can contain outdated information.

GetMessageAsync(ulong, bool)

Gets a specific message.

GetMessagesAfterAsync(ulong, int)

Returns a list of messages after a certain message.

The amount of messages to fetch.Message to fetch after from.
GetMessagesAroundAsync(ulong, int)

Returns a list of messages around a certain message.

The amount of messages to fetch.Message to fetch around from.
GetMessagesAsync(int)

Returns a list of messages from the last message in the channel.

The amount of messages to fetch.
GetMessagesBeforeAsync(ulong, int)

Returns a list of messages before a certain message.

The amount of messages to fetch.Message to fetch before from.
GetMinPosition()

Gets the minimum available position to move the channel to.

GetPinnedMessagesAsync()

Returns all pinned messages.

GetPrivateArchivedThreadsAsync(ulong?, int?)

Gets archived private threads. Can contain more threads. If the result's value 'HasMore' is true, you need to recall this function to get older threads.

GetPublicArchivedThreadsAsync(ulong?, int?)

Gets archived public threads. Can contain more threads. If the result's value 'HasMore' is true, you need to recall this function to get older threads.

GetStageAsync()

Gets a stage.

GetWebhooksAsync()

Returns a list of webhooks.

ModifyAsync(Action<ChannelEditModel>)

Modifies the current channel.

ModifyForumAsync(Action<ForumChannelEditModel>)

Modifies the current forum channel.

ModifyParentAsync(DiscordChannel, bool?, string)

Updates the channel parent, moving the channel to the bottom of the new category.

ModifyPositionAsync(int, string)

Updates the channel position when it doesn't have a category. Use ModifyParentAsync(DiscordChannel, bool?, string) for moving to other categories. Use RemoveParentAsync(string) to move out of a category. Use ModifyPositionInCategoryAsync(int, string) for moving within a category.

ModifyPositionInCategoryAsync(int, string)

Updates the channel position within it's own category. Use ModifyParentAsync(DiscordChannel, bool?, string) for moving to other categories. Use RemoveParentAsync(string) to move out of a category. Use ModifyPositionAsync(int, string) to move channels outside a category.

ModifyPositionInCategorySmartAsync(string, int, string)

Updates the channel position within it's own category. Valid modes: '+' or 'down' to move a channel down | '-' or 'up' to move a channel up. Use ModifyParentAsync(DiscordChannel, bool?, string) for moving to other categories. Use RemoveParentAsync(string) to move out of a category. Use ModifyPositionAsync(int, string) to move channels outside a category.

ModifyStageAsync(Optional<string>, string)

Modifies a stage topic.

OpenStageAsync(string, bool, ulong?, string)

Opens a stage.

PermissionsFor(DiscordMember)

Calculates permissions for a given member.

PlaceMemberAsync(DiscordMember)

Moves a member to this voice channel.

RefreshPositionsAsync()

Refreshes the positions.

RemoveParentAsync(string)

Moves the channel out of a category.

RemoveVoiceChannelStatusAsync(string)

Removes a voice channels status.

SendMessageAsync(DiscordEmbed)

Sends a message to this channel.

SendMessageAsync(DiscordMessageBuilder)

Sends a message to this channel.

SendMessageAsync(Action<DiscordMessageBuilder>)

Sends a message to this channel.

SendMessageAsync(string)

Sends a message to this channel.

SendMessageAsync(string, DiscordEmbed)

Sends a message to this channel.

SendSoundboardSoundAsync(ulong, ulong?)

Sends a soundboard sound to a voice channel the user is connected to.

SetVoiceChannelStatusAsync(string)

Sets a voice channels status.

ToString()

Returns a string representation of this channel.

TriggerTypingAsync()

Post a typing indicator.

TryGetForumPostTag(ulong)

Tries to get a forum channel tag.

TryGetMessageAsync(ulong, bool)

Tries to get a specific message.

UpdateCurrentUserVoiceStateAsync(bool?, DateTimeOffset?)

Updates the current user's suppress state in this channel, if stage channel.

Operators

operator ==(DiscordChannel, DiscordChannel)

Gets whether the two DiscordChannel objects are equal.

operator !=(DiscordChannel, DiscordChannel)

Gets whether the two DiscordChannel objects are not equal.