From f3396acea143653d02426947a80ef00fea9a7d34 Mon Sep 17 00:00:00 2001 From: LawMixer Date: Thu, 27 Jun 2024 09:11:05 -0400 Subject: [PATCH] update max poll duration 7 -> 32 days --- interactions/client/const.py | 2 +- interactions/models/discord/poll.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interactions/client/const.py b/interactions/client/const.py index 52eb709f8..7fae2a7bd 100644 --- a/interactions/client/const.py +++ b/interactions/client/const.py @@ -135,7 +135,7 @@ def get_logger() -> logging.Logger: EMBED_FIELD_VALUE_LENGTH = 1024 POLL_MAX_ANSWERS = 10 -POLL_MAX_DURATION_HOURS = 168 +POLL_MAX_DURATION_HOURS = 768 class Singleton(type): diff --git a/interactions/models/discord/poll.py b/interactions/models/discord/poll.py index 1656d7e23..e475b2d96 100644 --- a/interactions/models/discord/poll.py +++ b/interactions/models/discord/poll.py @@ -92,7 +92,7 @@ class Poll(DictSerializationMixin): answers: list[PollAnswer] = attrs.field(repr=False, factory=list, converter=PollAnswer.from_list) """Each of the answers available in the poll, up to 10.""" expiry: Timestamp = attrs.field(repr=False, default=MISSING, converter=optional(timestamp_converter)) - """Number of hours the poll is open for, up to 7 days.""" + """Number of hours the poll is open for, up to 32 days.""" allow_multiselect: bool = attrs.field(repr=False, default=False, metadata=no_export_meta) """Whether a user can select multiple answers.""" layout_type: PollLayoutType = attrs.field(repr=False, default=PollLayoutType.DEFAULT, converter=PollLayoutType) @@ -101,7 +101,7 @@ class Poll(DictSerializationMixin): """The results of the poll, if the polls is finished.""" _duration: int = attrs.field(repr=False, default=0) - """How long, in hours, the poll will be open for (up to 7 days). This is only used when creating polls.""" + """How long, in hours, the poll will be open for (up to 32 days). This is only used when creating polls.""" @classmethod def create(