Show / Hide Table of Contents

# Class RestGuildChannel

Represents a private REST-based group channel.

##### Inheritance

System.Object
RestEntity<System.UInt64>
RestChannel
RestGuildChannel
RestCategoryChannel
RestTextChannel
RestVoiceChannel

##### Implements

IUpdateable
IGuildChannel
IChannel
ISnowflakeEntity
IEntity<System.UInt64>
IDeletable

##### Inherited Members

RestChannel.CreatedAt
RestChannel.IChannel.Name
RestEntity<UInt64>.Id
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Discord.Rest

###### Assembly: Discord.Net.Rest.dll

##### Syntax

    public class RestGuildChannel : RestChannel, IUpdateable, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable

### Properties

| Improve this Doc View Source

#### GuildId

##### Declaration

    public ulong GuildId { get; }

##### Property Value

Type | Description
--- | ---
System.UInt64 |

| Improve this Doc View Source

#### Name

##### Declaration

    public string Name { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### PermissionOverwrites

##### Declaration

    public virtual IReadOnlyCollection<Overwrite> PermissionOverwrites { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<Overwrite> |

| Improve this Doc View Source

#### Position

##### Declaration

    public int Position { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

### Methods

| Improve this Doc View Source

#### AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)

Adds or updates the permission overwrite for the given role.

##### Declaration

    public virtual 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
--- | ---
System.Threading.Tasks.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 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
--- | ---
System.Threading.Tasks.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
--- | ---
System.Threading.Tasks.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
--- | ---
System.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
--- | ---
System.Nullable<OverwritePermissions> | An overwrite object for the targeted user; `null` if none is set.

| Improve this Doc View Source

#### ModifyAsync(Action<GuildChannelProperties>, RequestOptions)

##### Declaration

    public Task ModifyAsync(Action<GuildChannelProperties> func, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Action<GuildChannelProperties> | func |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### RemovePermissionOverwriteAsync(IRole, RequestOptions)

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

##### Declaration

    public virtual 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
--- | ---
System.Threading.Tasks.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 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
--- | ---
System.Threading.Tasks.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 this channel.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String | A string that is the name of this channel.

##### Overrides

System.Object.ToString()
| Improve this Doc View Source

#### UpdateAsync(RequestOptions)

##### Declaration

    public override Task UpdateAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

##### Overrides

RestChannel.UpdateAsync(RequestOptions)

### Explicit Interface Implementations

| Improve this Doc View Source

#### IChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)

##### Declaration

    Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | id |
CacheMode | mode |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<IUser> |

| Improve this Doc View Source

#### IChannel.GetUsersAsync(CacheMode, RequestOptions)

##### Declaration

    IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
CacheMode | mode |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<IUser>> |

| Improve this Doc View Source

#### IGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)

##### Declaration

    Task IGuildChannel.AddPermissionOverwriteAsync(IRole role, OverwritePermissions permissions, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
IRole | role |
OverwritePermissions | permissions |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### IGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)

##### Declaration

    Task IGuildChannel.AddPermissionOverwriteAsync(IUser user, OverwritePermissions permissions, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
IUser | user |
OverwritePermissions | permissions |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### IGuildChannel.GetPermissionOverwrite(IRole)

##### Declaration

    OverwritePermissions? IGuildChannel.GetPermissionOverwrite(IRole role)

##### Parameters

Type | Name | Description
--- | --- | ---
IRole | role |

##### Returns

Type | Description
--- | ---
System.Nullable<OverwritePermissions> |

| Improve this Doc View Source

#### IGuildChannel.GetPermissionOverwrite(IUser)

##### Declaration

    OverwritePermissions? IGuildChannel.GetPermissionOverwrite(IUser user)

##### Parameters

Type | Name | Description
--- | --- | ---
IUser | user |

##### Returns

Type | Description
--- | ---
System.Nullable<OverwritePermissions> |

| Improve this Doc View Source

#### IGuildChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)

##### Declaration

    Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | id |
CacheMode | mode |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<IGuildUser> |

| Improve this Doc View Source

#### IGuildChannel.GetUsersAsync(CacheMode, RequestOptions)

##### Declaration

    IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
CacheMode | mode |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<IGuildUser>> |

| Improve this Doc View Source

#### IGuildChannel.Guild

##### Declaration

    IGuild IGuildChannel.Guild { get; }

##### Returns

Type | Description
--- | ---
IGuild |

| Improve this Doc View Source

#### IGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)

##### Declaration

    Task IGuildChannel.RemovePermissionOverwriteAsync(IRole role, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
IRole | role |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### IGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)

##### Declaration

    Task IGuildChannel.RemovePermissionOverwriteAsync(IUser user, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
IUser | user |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

### Implements

IUpdateable
IGuildChannel
IChannel
ISnowflakeEntity
IEntity<TId>
IDeletable