Method AttachUserIntegrationAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
AttachUserIntegrationAsync(DiscordIntegration, CancellationToken)
Attaches an integration from current user to this guild.
public Task<DiscordIntegration> AttachUserIntegrationAsync(DiscordIntegration integration, CancellationToken cancellationToken = default)
Parameters
integrationDiscordIntegrationIntegration to attach.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<DiscordIntegration>
The integration after being attached to the guild.
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.