Class RestGuildChannel
Represents a private REST-based group channel.
Inheritance
Implements
Namespace: Discord.Rest
Assembly: Discord.Net.Rest.dll
Syntax
public class RestGuildChannel : RestChannel, IEntity<ulong>, IUpdateable, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties
| Improve this Doc View SourceGuildId
Declaration
public ulong GuildId { get; }
Property Value
Type | Description |
---|---|
UInt64 |
Name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
PermissionOverwrites
Declaration
public virtual IReadOnlyCollection<Overwrite> PermissionOverwrites { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<Overwrite> |
Position
Declaration
public int Position { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceAddPermissionOverwriteAsync(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. |
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. |
DeleteAsync(RequestOptions)
Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | options |
Returns
Type | Description |
---|---|
Task |
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; |
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; |
ModifyAsync(Action<GuildChannelProperties>, RequestOptions)
Declaration
public async Task ModifyAsync(Action<GuildChannelProperties> func, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
Action<GuildChannelProperties> | func | |
RequestOptions | options |
Returns
Type | Description |
---|---|
Task |
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. |
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. |
ToString()
Gets the name of this channel.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that is the name of this channel. |
UpdateAsync(RequestOptions)
Declaration
public override async Task UpdateAsync(RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | options |
Returns
Type | Description |
---|---|
Task |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIGuildChannel.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. |