Skip to content

Commit 8a4eebb

Browse files
committed
chore!: Reflect new TODO work for launch.
1 parent d0b0c2b commit 8a4eebb

File tree

16 files changed

+21
-26
lines changed

16 files changed

+21
-26
lines changed

interactions/api/enums.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Normal libraries
22
from enum import IntEnum
33

4-
# TODO: Implement this into the new error system at a later point.
4+
# TODO: post-v4: Implement this into the new error system at a later point.
55
# class DefaultErrorType(IntEnum):
66
# """
77
# An enumerable object for the default errors that occur with interaction creation.
@@ -50,7 +50,7 @@ class OpCodeType(IntEnum):
5050
GUILD_SYNC = 12
5151

5252

53-
# TODO: Implement this into the new error system at a later point.
53+
# TODO: post-v4: Implement this into the new error system at a later point.
5454
# class WSCloseCodeType(IntEnum):
5555
# """
5656
# An enumerable object for the Gateway's closing connection codes.
@@ -76,7 +76,7 @@ class OpCodeType(IntEnum):
7676
# DISALLOWED_INTENTS = 4014
7777

7878

79-
# TODO: Implement this into the new error system at a later point.
79+
# TODO: post-v4: Implement this into the new error system at a later point.
8080
# class HTTPResponseType(IntEnum):
8181
# """
8282
# An enumerable object for the HTTP response codes Discord gives out.
@@ -98,7 +98,7 @@ class OpCodeType(IntEnum):
9898
# GATEWAY_UNAVAILABLE = 502
9999

100100

101-
# TODO: Implement this into the new error system at a later point.
101+
# TODO: post-v4: Implement this into the new error system at a later point.
102102
# class JSONResponseType(IntEnum):
103103
# """
104104
# An enumerable object for the JSON error response codes Discord gives out.

interactions/api/error.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ def error(self) -> None:
9191
_err_val = ""
9292
_err_unidentifiable = False
9393
_empty_space = " "
94-
95-
# TODO: determine need. do we need to override at all?
9694
_overrided = "message" in self.kwargs
9795

9896
if issubclass(type(self._type), IntEnum):
@@ -269,5 +267,5 @@ def lookup() -> dict:
269267
20028: "The channel you are writing has hit the write rate limit",
270268
20031: "Your Stage topic, server name, server description, or channel names contain words that are not allowed",
271269
20035: "Guild premium subscription level too low"
272-
# TODO: finish dict.
270+
# TODO: post-v4: finish dict.
273271
}

interactions/api/http.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,9 @@ async def send_message(
405405
if message_reference:
406406
payload["message_reference"] = message_reference
407407

408-
# TODO: add attachments to payload.
408+
# TODO: post-v4. add attachments to payload.
409409

410410
if isinstance(channel_id, Snowflake):
411-
# TODO: Convert HTTP endpoints to support Snowflake model/str as per schema.
412411
channel_id = int(channel_id)
413412

414413
return await self.create_message(payload, channel_id)

interactions/api/models/guild.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class Guild(DictSerializerMixin):
190190
"nsfw_level",
191191
"stage_instances",
192192
"stickers",
193-
# TODO: Investigate all of these once Discord has them all documented.
193+
# TODO: post-v4: Investigate all of these once Discord has them all documented.
194194
"guild_hashes",
195195
"embedded_activities",
196196
"guild_scheduled_events",

interactions/api/models/guild.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Guild(DictSerializerMixin):
8585
stage_instances: Optional[List[StageInstance]]
8686
stickers: Optional[List[Sticker]]
8787

88-
# TODO: Investigate all of these once Discord has them all documented.
88+
# TODO: post-v4: Investigate all of these once Discord has them all documented.
8989
guild_hashes: Any
9090
embedded_activities: Any
9191
guild_scheduled_events: Any

interactions/api/models/gw.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class GuildMembers(DictSerializerMixin):
5656
not_found: Optional[list]
5757
presences: Optional[
5858
List["Presence"]
59-
] # TODO: Check what this returns, then compare to existing models first.
59+
]
6060
nonce: Optional[str]
6161
def __init__(self, **kwargs): ...
6262

interactions/api/models/member.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class Member(DictSerializerMixin):
3939
"pending",
4040
"permissions",
4141
"communication_disabled_until",
42-
# TODO: Investigate what this is for once documented by Discord.
4342
"hoisted_role",
4443
)
4544

interactions/api/models/member.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ class Member(DictSerializerMixin):
2020
pending: Optional[bool]
2121
permissions: Optional[str]
2222
communication_disabled_until: Optional[str]
23-
hoisted_role: Any # TODO: Investigate what this is for when documented by Discord.
23+
hoisted_role: Any # TODO: post-v4: Investigate what this is for when documented by Discord.
2424
def __init__(self, **kwargs): ...

interactions/api/models/message.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ class Message(DictSerializerMixin):
182182
:ivar Optional[MessageActivity] activity?: Message activity object that's sent by Rich Presence
183183
:ivar Optional[Application] application?: Application object that's sent by Rich Presence
184184
:ivar Optional[MessageReference] message_reference?: Data showing the source of a message (crosspost, channel follow, add, pin, or replied message)
185+
:ivar Optional[Any] allowed_mentions: The allowed mentions of roles attached in the message.
185186
:ivar int flags: Message flags
186187
:ivar Optional[MessageInteraction] interaction?: Message interaction object, if the message is sent by an interaction.
187188
:ivar Optional[Channel] thread:? The thread that started from this message, if any, with a thread member object embedded.
@@ -216,7 +217,7 @@ class Message(DictSerializerMixin):
216217
"application",
217218
"application_id",
218219
"message_reference",
219-
"allowed_mentions", # TODO: add this to the documentation.
220+
"allowed_mentions",
220221
"flags",
221222
"referenced_message",
222223
"interaction",

interactions/api/models/misc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO: This is post-v4.
12
# TODO: Reorganise these models based on which big obj uses little obj
23
# TODO: Potentially rename some model references to enums, if applicable
34
# TODO: Reorganise mixins to its own thing, currently placed here because circular import sucks.

0 commit comments

Comments
 (0)