Method EndPollAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
EndPollAsync(CancellationToken)
Ends the poll on this message.
Works only for own polls and if they are not expired yet.
public Task<DiscordMessage> EndPollAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<DiscordMessage>
The fresh discord message.
Exceptions
- InvalidOperationException
Thrown when the message has no poll, the author is not us, or the poll has been already ended.