Skip to content

Commit acd44d0

Browse files
authored
Merge pull request #1710 from interactions-py/unstable
5.13.1
2 parents 87f814f + 902b753 commit acd44d0

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

Diff for: interactions/client/const.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def get_logger() -> logging.Logger:
135135
EMBED_FIELD_VALUE_LENGTH = 1024
136136

137137
POLL_MAX_ANSWERS = 10
138-
POLL_MAX_DURATION_HOURS = 168
138+
POLL_MAX_DURATION_HOURS = 768
139139

140140

141141
class Singleton(type):
@@ -244,7 +244,7 @@ def has_client_feature(feature: str) -> bool:
244244
if TYPE_CHECKING:
245245
from interactions import Client
246246

247-
ClientT = typing_extensions.TypeVar("ClientT", bound=Client, default=Client)
247+
ClientT = typing_extensions.TypeVar("ClientT", bound=Client, default=Client, covariant=True)
248248
else:
249249
ClientT = TypeVar("ClientT")
250250

Diff for: interactions/models/discord/enums.py

+6
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,15 @@ class Intents(DiscordIntFlag): # type: ignore
205205
GUILD_SCHEDULED_EVENTS = 1 << 16
206206
AUTO_MODERATION_CONFIGURATION = 1 << 20
207207
AUTO_MODERATION_EXECUTION = 1 << 21
208+
GUILD_MESSAGE_POLLS = 1 << 24
209+
DIRECT_MESSAGE_POLLS = 1 << 25
208210

209211
# Shortcuts/grouping/aliases
210212
MESSAGES = GUILD_MESSAGES | DIRECT_MESSAGES
211213
REACTIONS = GUILD_MESSAGE_REACTIONS | DIRECT_MESSAGE_REACTIONS
212214
TYPING = GUILD_MESSAGE_TYPING | DIRECT_MESSAGE_TYPING
213215
AUTO_MOD = AUTO_MODERATION_CONFIGURATION | AUTO_MODERATION_EXECUTION
216+
POLLS = GUILD_MESSAGE_POLLS | DIRECT_MESSAGE_POLLS
214217

215218
PRIVILEGED = GUILD_PRESENCES | GUILD_MEMBERS | MESSAGE_CONTENT
216219
NON_PRIVILEGED = AntiFlag(PRIVILEGED)
@@ -233,14 +236,17 @@ def new(
233236
guild_voice_states=False,
234237
guild_presences=False,
235238
guild_messages=False,
239+
guild_message_polls=False,
236240
guild_message_reactions=False,
237241
guild_message_typing=False,
238242
direct_messages=False,
243+
direct_message_polls=False,
239244
direct_message_reactions=False,
240245
direct_message_typing=False,
241246
message_content=False,
242247
guild_scheduled_events=False,
243248
messages=False,
249+
polls=False,
244250
reactions=False,
245251
typing=False,
246252
privileged=False,

Diff for: interactions/models/discord/poll.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
timestamp_converter,
1010
)
1111
from interactions.client.mixins.serialization import DictSerializationMixin
12-
from interactions.client.utils.serializer import no_export_meta
1312
from interactions.models.discord.emoji import PartialEmoji, process_emoji
1413
from interactions.models.discord.enums import PollLayoutType
1514
from interactions.models.discord.timestamp import Timestamp
@@ -92,16 +91,16 @@ class Poll(DictSerializationMixin):
9291
answers: list[PollAnswer] = attrs.field(repr=False, factory=list, converter=PollAnswer.from_list)
9392
"""Each of the answers available in the poll, up to 10."""
9493
expiry: Timestamp = attrs.field(repr=False, default=MISSING, converter=optional(timestamp_converter))
95-
"""Number of hours the poll is open for, up to 7 days."""
96-
allow_multiselect: bool = attrs.field(repr=False, default=False, metadata=no_export_meta)
94+
"""Number of hours the poll is open for, up to 32 days."""
95+
allow_multiselect: bool = attrs.field(repr=False, default=False)
9796
"""Whether a user can select multiple answers."""
9897
layout_type: PollLayoutType = attrs.field(repr=False, default=PollLayoutType.DEFAULT, converter=PollLayoutType)
9998
"""The layout type of the poll."""
10099
results: Optional[PollResults] = attrs.field(repr=False, default=None, converter=optional(PollResults.from_dict))
101100
"""The results of the poll, if the polls is finished."""
102101

103102
_duration: int = attrs.field(repr=False, default=0)
104-
"""How long, in hours, the poll will be open for (up to 7 days). This is only used when creating polls."""
103+
"""How long, in hours, the poll will be open for (up to 32 days). This is only used when creating polls."""
105104

106105
@classmethod
107106
def create(

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "interactions.py"
3-
version = "5.13.0"
3+
version = "5.13.1"
44
description = "Easy, simple, scalable and modular: a Python API wrapper for interactions."
55
authors = ["LordOfPolls <[email protected]>"]
66

0 commit comments

Comments
 (0)