Search Results for

    Show / Hide Table of Contents

    Class SocketThreadChannel

    Represents a thread channel inside of a guild.

    Inheritance
    Object
    SocketEntity<UInt64>
    SocketChannel
    SocketGuildChannel
    SocketTextChannel
    SocketThreadChannel
    Implements
    IEntity<UInt64>
    ISocketMessageChannel
    IThreadChannel
    ITextChannel
    IMessageChannel
    IMentionable
    INestedChannel
    IGuildChannel
    IChannel
    ISnowflakeEntity
    IEntity<UInt64>
    IDeletable
    Inherited Members
    SocketTextChannel.Topic
    SocketTextChannel.SlowModeInterval
    SocketTextChannel.CategoryId
    SocketTextChannel.Category
    SocketTextChannel.IsNsfw
    SocketTextChannel.Mention
    SocketTextChannel.CachedMessages
    SocketTextChannel.Threads
    SocketTextChannel.CreateThreadAsync(String, ThreadType, ThreadArchiveDuration, IMessage, Nullable<Boolean>, Nullable<Int32>, RequestOptions)
    SocketTextChannel.GetCachedMessage(UInt64)
    SocketTextChannel.GetMessageAsync(UInt64, RequestOptions)
    SocketTextChannel.GetMessagesAsync(Int32, RequestOptions)
    SocketTextChannel.GetMessagesAsync(UInt64, Direction, Int32, RequestOptions)
    SocketTextChannel.GetMessagesAsync(IMessage, Direction, Int32, RequestOptions)
    SocketTextChannel.GetCachedMessages(Int32)
    SocketTextChannel.GetCachedMessages(UInt64, Direction, Int32)
    SocketTextChannel.GetCachedMessages(IMessage, Direction, Int32)
    SocketTextChannel.GetPinnedMessagesAsync(RequestOptions)
    SocketTextChannel.SendMessageAsync(String, Boolean, Embed, RequestOptions, AllowedMentions, MessageReference, MessageComponent, ISticker[], Embed[], MessageFlags)
    SocketTextChannel.SendFileAsync(String, String, Boolean, Embed, RequestOptions, Boolean, AllowedMentions, MessageReference, MessageComponent, ISticker[], Embed[], MessageFlags)
    SocketTextChannel.SendFileAsync(Stream, String, String, Boolean, Embed, RequestOptions, Boolean, AllowedMentions, MessageReference, MessageComponent, ISticker[], Embed[], MessageFlags)
    SocketTextChannel.SendFileAsync(FileAttachment, String, Boolean, Embed, RequestOptions, AllowedMentions, MessageReference, MessageComponent, ISticker[], Embed[], MessageFlags)
    SocketTextChannel.SendFilesAsync(IEnumerable<FileAttachment>, String, Boolean, Embed, RequestOptions, AllowedMentions, MessageReference, MessageComponent, ISticker[], Embed[], MessageFlags)
    SocketTextChannel.DeleteMessagesAsync(IEnumerable<IMessage>, RequestOptions)
    SocketTextChannel.DeleteMessagesAsync(IEnumerable<UInt64>, RequestOptions)
    SocketTextChannel.ModifyMessageAsync(UInt64, Action<MessageProperties>, RequestOptions)
    SocketTextChannel.DeleteMessageAsync(UInt64, RequestOptions)
    SocketTextChannel.DeleteMessageAsync(IMessage, RequestOptions)
    SocketTextChannel.TriggerTypingAsync(RequestOptions)
    SocketTextChannel.EnterTypingState(RequestOptions)
    SocketTextChannel.CreateInviteToApplicationAsync(DefaultApplications, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)
    SocketGuildChannel.Guild
    SocketGuildChannel.Name
    SocketGuildChannel.Position
    SocketGuildChannel.ModifyAsync(Action<GuildChannelProperties>, RequestOptions)
    SocketGuildChannel.DeleteAsync(RequestOptions)
    SocketGuildChannel.ToString()
    SocketGuildChannel.IGuildChannel.Guild
    SocketEntity<UInt64>.Id
    Namespace: Discord.WebSocket
    Assembly: Discord.Net.WebSocket.dll
    Syntax
    public class SocketThreadChannel : SocketTextChannel, IEntity<ulong>, ISocketMessageChannel, IThreadChannel, ITextChannel, IMessageChannel, IMentionable, INestedChannel, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable

    Properties

    | Improve this Doc View Source

    ArchiveTimestamp

    Declaration
    public DateTimeOffset ArchiveTimestamp { get; }
    Property Value
    Type Description
    DateTimeOffset
    | Improve this Doc View Source

    AutoArchiveDuration

    Gets the duration of time before the thread is automatically archived after no activity.

    Declaration
    public ThreadArchiveDuration AutoArchiveDuration { get; }
    Property Value
    Type Description
    ThreadArchiveDuration
    | Improve this Doc View Source

    CreatedAt

    Gets when the thread was created.

    Declaration
    public override DateTimeOffset CreatedAt { get; }
    Property Value
    Type Description
    DateTimeOffset
    Overrides
    SocketChannel.CreatedAt
    Remarks

    This property is only populated for threads created after 2022-01-09, hence the default date of this property will be that date.

    | Improve this Doc View Source

    CurrentUser

    Gets the current users within this thread.

    Declaration
    public SocketThreadUser CurrentUser { get; }
    Property Value
    Type Description
    SocketThreadUser
    | Improve this Doc View Source

    HasJoined

    Declaration
    public bool HasJoined { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsArchived

    Declaration
    public bool IsArchived { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsInvitable

    Declaration
    public bool? IsInvitable { get; }
    Property Value
    Type Description
    Nullable<Boolean>
    | Improve this Doc View Source

    IsLocked

    Declaration
    public bool IsLocked { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsPrivateThread

    true if this thread is private, otherwise false
    Declaration
    public bool IsPrivateThread { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    MemberCount

    Declaration
    public int MemberCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    MessageCount

    Declaration
    public int MessageCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Owner

    Gets the owner of the current thread.

    Declaration
    public SocketThreadUser Owner { get; }
    Property Value
    Type Description
    SocketThreadUser
    | Improve this Doc View Source

    ParentChannel

    Gets the parent channel this thread resides in.

    Declaration
    public SocketGuildChannel ParentChannel { get; }
    Property Value
    Type Description
    SocketGuildChannel
    | Improve this Doc View Source

    PermissionOverwrites

    Declaration
    public override IReadOnlyCollection<Overwrite> PermissionOverwrites { get; }
    Property Value
    Type Description
    IReadOnlyCollection<Overwrite>
    Overrides
    SocketGuildChannel.PermissionOverwrites
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    Type

    Gets the type of the current thread channel.

    Declaration
    public ThreadType Type { get; }
    Property Value
    Type Description
    ThreadType
    | Improve this Doc View Source

    Users

    Gets a collection of cached users within this thread.

    Declaration
    public IReadOnlyCollection<SocketThreadUser> Users { get; }
    Property Value
    Type Description
    IReadOnlyCollection<SocketThreadUser>

    Methods

    | Improve this Doc View Source

    AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)

    Adds or updates the permission overwrite for the given role.

    Declaration
    public override Task AddPermissionOverwriteAsync(IRole role, OverwritePermissions permissions, RequestOptions options = null)
    Parameters
    Type Name Description
    IRole role

    The role to add the overwrite to.

    OverwritePermissions permissions

    The overwrite to add to the role.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task representing the asynchronous permission operation for adding the specified permissions to the channel.

    Overrides
    SocketGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)

    Adds or updates the permission overwrite for the given user.

    Declaration
    public override Task AddPermissionOverwriteAsync(IUser user, OverwritePermissions permissions, RequestOptions options = null)
    Parameters
    Type Name Description
    IUser user

    The user to add the overwrite to.

    OverwritePermissions permissions

    The overwrite to add to the user.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task representing the asynchronous permission operation for adding the specified permissions to the channel.

    Overrides
    SocketGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    AddUserAsync(IGuildUser, RequestOptions)

    Adds a user to this thread.

    Declaration
    public Task AddUserAsync(IGuildUser user, RequestOptions options = null)
    Parameters
    Type Name Description
    IGuildUser user

    The IGuildUser to add.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation of adding a member to a thread.

    | Improve this Doc View Source

    CreateInviteAsync(Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)

    Declaration
    public override Task<IInviteMetadata> CreateInviteAsync(int? maxAge, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
    Parameters
    Type Name Description
    Nullable<Int32> maxAge
    Nullable<Int32> maxUses
    Boolean isTemporary
    Boolean isUnique
    RequestOptions options
    Returns
    Type Description
    Task<IInviteMetadata>
    Overrides
    SocketTextChannel.CreateInviteAsync(Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    CreateInviteToApplicationAsync(UInt64, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)

    Declaration
    public override Task<IInviteMetadata> CreateInviteToApplicationAsync(ulong applicationId, int? maxAge, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 applicationId
    Nullable<Int32> maxAge
    Nullable<Int32> maxUses
    Boolean isTemporary
    Boolean isUnique
    RequestOptions options
    Returns
    Type Description
    Task<IInviteMetadata>
    Overrides
    SocketTextChannel.CreateInviteToApplicationAsync(UInt64, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    CreateInviteToStreamAsync(IUser, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)

    Declaration
    public override Task<IInviteMetadata> CreateInviteToStreamAsync(IUser user, int? maxAge, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
    Parameters
    Type Name Description
    IUser user
    Nullable<Int32> maxAge
    Nullable<Int32> maxUses
    Boolean isTemporary
    Boolean isUnique
    RequestOptions options
    Returns
    Type Description
    Task<IInviteMetadata>
    Overrides
    SocketTextChannel.CreateInviteToStreamAsync(IUser, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    CreateWebhookAsync(String, Stream, RequestOptions)

    Creates a webhook in this text channel.

    Declaration
    public override Task<RestWebhook> CreateWebhookAsync(string name, Stream avatar = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The name of the webhook.

    Stream avatar

    The avatar of the webhook.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<RestWebhook>

    A task that represents the asynchronous creation operation. The task result contains the newly created webhook.

    Overrides
    SocketTextChannel.CreateWebhookAsync(String, Stream, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    DownloadUsersAsync(RequestOptions)

    Downloads all users that have access to this thread.

    Declaration
    public async Task DownloadUsersAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task representing the asynchronous download operation.

    | Improve this Doc View Source

    GetInvitesAsync(RequestOptions)

    Declaration
    public override Task<IReadOnlyCollection<IInviteMetadata>> GetInvitesAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task<IReadOnlyCollection<IInviteMetadata>>
    Overrides
    SocketTextChannel.GetInvitesAsync(RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    GetPermissionOverwrite(IRole)

    Gets the permission overwrite for a specific role.

    Declaration
    public override OverwritePermissions? GetPermissionOverwrite(IRole role)
    Parameters
    Type Name Description
    IRole role

    The role to get the overwrite from.

    Returns
    Type Description
    Nullable<OverwritePermissions>

    An overwrite object for the targeted role; null if none is set.

    Overrides
    SocketGuildChannel.GetPermissionOverwrite(IRole)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    GetPermissionOverwrite(IUser)

    Gets the permission overwrite for a specific user.

    Declaration
    public override OverwritePermissions? GetPermissionOverwrite(IUser user)
    Parameters
    Type Name Description
    IUser user

    The user to get the overwrite from.

    Returns
    Type Description
    Nullable<OverwritePermissions>

    An overwrite object for the targeted user; null if none is set.

    Overrides
    SocketGuildChannel.GetPermissionOverwrite(IUser)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    GetUser(UInt64)

    Declaration
    public SocketThreadUser GetUser(ulong id)
    Parameters
    Type Name Description
    UInt64 id
    Returns
    Type Description
    SocketThreadUser
    | Improve this Doc View Source

    GetUsersAsync(RequestOptions)

    Gets all users inside this thread.

    Declaration
    public async Task<IReadOnlyCollection<SocketThreadUser>> GetUsersAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<SocketThreadUser>>

    A task representing the download operation.

    Remarks

    If all users are not downloaded then this method will call DownloadUsersAsync(RequestOptions) and return the result.

    | Improve this Doc View Source

    GetWebhookAsync(UInt64, RequestOptions)

    Gets a webhook available in this text channel.

    Declaration
    public override Task<RestWebhook> GetWebhookAsync(ulong id, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The identifier of the webhook.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<RestWebhook>

    A task that represents the asynchronous get operation. The task result contains a webhook associated with the identifier; null if the webhook is not found.

    Overrides
    SocketTextChannel.GetWebhookAsync(UInt64, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    GetWebhooksAsync(RequestOptions)

    Gets the webhooks available in this text channel.

    Declaration
    public override Task<IReadOnlyCollection<RestWebhook>> GetWebhooksAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<RestWebhook>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of webhooks that is available in this channel.

    Overrides
    SocketTextChannel.GetWebhooksAsync(RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    JoinAsync(RequestOptions)

    Declaration
    public Task JoinAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    LeaveAsync(RequestOptions)

    Declaration
    public Task LeaveAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    ModifyAsync(Action<TextChannelProperties>, RequestOptions)

    Declaration
    public override Task ModifyAsync(Action<TextChannelProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<TextChannelProperties> func
    RequestOptions options
    Returns
    Type Description
    Task
    Overrides
    SocketTextChannel.ModifyAsync(Action<TextChannelProperties>, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    RemovePermissionOverwriteAsync(IRole, RequestOptions)

    Removes the permission overwrite for the given role, if one exists.

    Declaration
    public override Task RemovePermissionOverwriteAsync(IRole role, RequestOptions options = null)
    Parameters
    Type Name Description
    IRole role

    The role to remove the overwrite from.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation for removing the specified permissions from the channel.

    Overrides
    SocketGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    RemovePermissionOverwriteAsync(IUser, RequestOptions)

    Removes the permission overwrite for the given user, if one exists.

    Declaration
    public override Task RemovePermissionOverwriteAsync(IUser user, RequestOptions options = null)
    Parameters
    Type Name Description
    IUser user

    The user to remove the overwrite from.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation for removing the specified permissions from the channel.

    Overrides
    SocketGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)
    Remarks

    This method is not supported in threads.

    | Improve this Doc View Source

    RemoveUserAsync(IGuildUser, RequestOptions)

    Removes a user from this thread.

    Declaration
    public Task RemoveUserAsync(IGuildUser user, RequestOptions options = null)
    Parameters
    Type Name Description
    IGuildUser user

    The IGuildUser to remove from this thread.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation of removing a user from this thread.

    | Improve this Doc View Source

    SyncPermissionsAsync(RequestOptions)

    Declaration
    public override Task SyncPermissionsAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    Overrides
    SocketTextChannel.SyncPermissionsAsync(RequestOptions)
    Remarks

    This method is not supported in threads.

    Implements

    IEntity<TId>
    ISocketMessageChannel
    IThreadChannel
    ITextChannel
    IMessageChannel
    IMentionable
    INestedChannel
    IGuildChannel
    IChannel
    ISnowflakeEntity
    IEntity<TId>
    IDeletable

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.6.0