Search Results for

    Show / Hide Table of Contents

    Class SocketGuildChannel

    Represents a WebSocket-based guild channel.

    Inheritance
    Object
    SocketEntity<UInt64>
    SocketChannel
    SocketGuildChannel
    SocketCategoryChannel
    SocketForumChannel
    SocketTextChannel
    Implements
    IEntity<UInt64>
    IGuildChannel
    IChannel
    ISnowflakeEntity
    IEntity<UInt64>
    IDeletable
    Inherited Members
    SocketChannel.CreatedAt
    SocketEntity<UInt64>.Id
    Namespace: Discord.WebSocket
    Assembly: Discord.Net.WebSocket.dll
    Syntax
    public class SocketGuildChannel : SocketChannel, IEntity<ulong>, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable

    Properties

    | Improve this Doc View Source

    Flags

    Gets the flags related to this channel.

    Declaration
    public ChannelFlags Flags { get; }
    Property Value
    Type Description
    ChannelFlags

    A channel's flags, if any is associated.

    Remarks

    This value is determined by bitwise OR-ing ChannelFlags values together.

    | Improve this Doc View Source

    Guild

    Gets the guild associated with this channel.

    Declaration
    public SocketGuild Guild { get; }
    Property Value
    Type Description
    SocketGuild

    A guild object that this channel belongs to.

    | Improve this Doc View Source

    Name

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

    PermissionOverwrites

    Declaration
    public virtual IReadOnlyCollection<Overwrite> PermissionOverwrites { get; }
    Property Value
    Type Description
    IReadOnlyCollection<Overwrite>
    | Improve this Doc View Source

    Position

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

    Users

    Gets a collection of users that are able to view the channel.

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

    A read-only collection of users that can access the channel (i.e. the users seen in the user list).

    Remarks

    If this channel is a voice channel, use ConnectedUsers to retrieve a collection of users who are currently connected to this channel.

    Methods

    | Improve this Doc View Source

    AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)

    Adds or updates the permission overwrite for the given role.

    Declaration
    public virtual async 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.

    | Improve this Doc View Source

    AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)

    Adds or updates the permission overwrite for the given user.

    Declaration
    public virtual async 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.

    | Improve this Doc View Source

    DeleteAsync(RequestOptions)

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

    GetPermissionOverwrite(IRole)

    Gets the permission overwrite for a specific role.

    Declaration
    public virtual 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.

    | Improve this Doc View Source

    GetPermissionOverwrite(IUser)

    Gets the permission overwrite for a specific user.

    Declaration
    public virtual 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.

    | Improve this Doc View Source

    GetUser(UInt64)

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

    ModifyAsync(Action<GuildChannelProperties>, RequestOptions)

    Declaration
    public Task ModifyAsync(Action<GuildChannelProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<GuildChannelProperties> func
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RemovePermissionOverwriteAsync(IRole, RequestOptions)

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

    Declaration
    public virtual async 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.

    | Improve this Doc View Source

    RemovePermissionOverwriteAsync(IUser, RequestOptions)

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

    Declaration
    public virtual async 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.

    | Improve this Doc View Source

    ToString()

    Gets the name of the channel.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that resolves to Name.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IGuildChannel.Guild

    Gets the guild associated with this channel.

    Declaration
    IGuild IGuildChannel.Guild { get; }
    Returns
    Type Description
    IGuild

    A guild object that this channel belongs to.

    Implements

    IEntity<TId>
    IGuildChannel
    IChannel
    ISnowflakeEntity
    IEntity<TId>
    IDeletable

    Theme

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