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