Table of Contents

Method EndAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

EndAsync(CancellationToken)

Ends the poll.

Works only for own polls and if they are not expired yet.

public Task<DiscordMessage> EndAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordMessage>

The fresh discord message.

Exceptions

InvalidOperationException

Thrown when the author is not us, or the poll has been already ended.