Table of Contents

Class DiscordPollBuilder

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

Constructs a poll to be send.

public sealed class DiscordPollBuilder
Inheritance
DiscordPollBuilder
Inherited Members

Properties

AllowMultiselect

Gets or sets whether a user can select multiple answers. Defaults to false.

Answers

Gets the answers.

Duration

Gets or sets the number of hours the poll should be open for, up to 32 days. Defaults to 24 hours.

LayoutType

Gets or sets the layout type. Defaults to Default.

Question

Gets or sets the question.

Methods

AddAnswers(params DiscordPollAnswer[])

Adds answers to a poll, up to 10 answers.

AddAnswers(IEnumerable<DiscordPollAnswer>)

Adds answers to a poll, up to 10 answers.

AddAnswers(params string[])

Adds answers without emoji to a poll, up to 10 answers.

Clear()

Allows for clearing the poll builder so that it can be used again to build a new poll.

ClearAnswers()

Clears all answers on this builder.

SendAsync(DiscordChannel)

Sends the poll to a specific channel

SetDuration(int)

Sets the duration for the poll.

WithAllowMultiselect(bool)

ALlows users to select multiple answers or not.

WithQuestion(string)

Sets the question of a poll.