Skip to content

Commit 7d62aa3

Browse files
committed
feat(flags): Add show_link_not_discord_warning flag
Signed-off-by: Mathieu Corsham <[email protected]>
1 parent 1fc6a34 commit 7d62aa3

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

discord/flags.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,17 @@ def failed_to_mention_some_roles_in_thread(self):
326326
""":class:`bool`: Returns ``True`` if the message failed to mention some roles and add their members to the thread."""
327327
return 256
328328

329+
@flag_value
330+
def show_link_not_discord_warning(self):
331+
""":class:`bool`: Returns ``True`` if the message should show a warning that the link may not be safe.
332+
333+
.. note::
334+
Although this gets set by Discord for some embeds, and we receive a :func:`~discord.on_message_edit` event, it is not officially documented by Discord.
335+
It's in the client but not used anywhere.
336+
"""
337+
338+
return 1024
339+
329340
@flag_value
330341
def suppress_notifications(self):
331342
""":class:`bool`: Returns ``True`` if the message is "silent".

discord/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
Union,
3434
Type,
3535
Tuple,
36-
Iterable,
3736
Awaitable,
3837
Coroutine,
3938
Sequence,
@@ -629,7 +628,7 @@ def valid_icon_size(size: int) -> bool:
629628
return not size & (size - 1) and size in range(16, 4097)
630629

631630

632-
class SnowflakeList(array.array):
631+
class SnowflakeList(array.array, Iterable[int]):
633632
"""Internal data storage class to efficiently store a list of snowflakes.
634633
635634
This should have the following characteristics:

0 commit comments

Comments
 (0)