Method WithDuration
- Namespace
 - DSharpPlus.Entities
 
- Assembly
 - DSharpPlus.dll
 
WithDuration(int)
Sets the expiry date for this poll.
public DiscordPollBuilder WithDuration(int hours)
Parameters
hoursintHow many hours the poll should last.
Returns
- DiscordPollBuilder
 The modified builder to chain calls with.
Exceptions
- InvalidOperationException
 Thrown if
hoursis in the past or more than 7 days in the future.