Table of Contents

Method EnableInvitesAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

EnableInvitesAsync(string?, CancellationToken)

Enables invites for the guild.

public Task<DiscordGuild> EnableInvitesAsync(string? reason = null, CancellationToken cancellationToken = default)

Parameters

reason string

The audit log reason.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordGuild>

Exceptions

UnauthorizedException

Thrown when the client does not have the ManageGuild permission.

NotFoundException

Thrown when the guild does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.