From ae497945b421f5b1ec574a998b795ffa217fe940 Mon Sep 17 00:00:00 2001 From: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com> Date: Tue, 2 Jul 2024 01:17:04 +0300 Subject: [PATCH] longer polls (#2953) --- src/Discord.Net.Core/Utils/Preconditions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Core/Utils/Preconditions.cs b/src/Discord.Net.Core/Utils/Preconditions.cs index 2d3fa16f..aa61495b 100644 --- a/src/Discord.Net.Core/Utils/Preconditions.cs +++ b/src/Discord.Net.Core/Utils/Preconditions.cs @@ -138,8 +138,8 @@ namespace Discord throw new ArgumentOutOfRangeException(nameof(poll.Question), $"Poll question text must be less than or equal to {DiscordConfig.MaxPollQuestionTextLength} characters."); if (string.IsNullOrWhiteSpace(poll.Question.Text) && poll.Question.Emoji is null) throw new ArgumentException("Poll question must have at least one of text or emoji.", nameof(poll.Question)); - if (poll.Duration is > 168 or 0) - throw new ArgumentOutOfRangeException(nameof(poll.Duration), "Poll duration must be between 1 and 168 hours."); + if (poll.Duration is > 768 or 0) + throw new ArgumentOutOfRangeException(nameof(poll.Duration), "Poll duration must be between 1 and 768 hours."); } #endregion