Discore
Show / Hide Table of Contents

Method DisconnectAsync

| Improve this Doc View Source

DisconnectAsync(CancellationToken?)

Closes this voice connection.

Note: The connection will still be closed if the passed cancellation token is cancelled.

Declaration
public Task DisconnectAsync(CancellationToken? cancellationToken = null)
Parameters
Type Name Description
CancellationToken? cancellationToken

A token which will force close the connection when cancelled.

Returns
Type Description
Task

Returns whether the operation was successful.

Exceptions
Type Condition
InvalidOperationException

Thrown if this voice connection is not connected.

OperationCanceledException
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX