Table of Contents

Method AddOverwriteAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddOverwriteAsync(DiscordRole, Permissions, Permissions, string)

Adds a channel permission overwrite for specified role.

public Task AddOverwriteAsync(DiscordRole role, Permissions allow = Permissions.None, Permissions deny = Permissions.None, string reason = null)

Parameters

role DiscordRole

The role to have the permission added.

allow Permissions

The permissions to allow.

deny Permissions

The permissions to deny.

reason string

Reason for audit logs.

Returns

Task

Exceptions

UnauthorizedException

Thrown when the client does not have the ManageRoles permission.

NotFoundException

Thrown when the channel does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.

AddOverwriteAsync(DiscordMember, Permissions, Permissions, string)

Adds a channel permission overwrite for specified member.

public Task AddOverwriteAsync(DiscordMember member, Permissions allow = Permissions.None, Permissions deny = Permissions.None, string reason = null)

Parameters

member DiscordMember

The member to have the permission added.

allow Permissions

The permissions to allow.

deny Permissions

The permissions to deny.

reason string

Reason for audit logs.

Returns

Task

Exceptions

UnauthorizedException

Thrown when the client does not have the ManageRoles permission.

NotFoundException

Thrown when the channel does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.