Skip to content

Commit 7e32e4e

Browse files
committed
Update flags
1 parent cfb29a6 commit 7e32e4e

File tree

1 file changed

+212
-4
lines changed

1 file changed

+212
-4
lines changed

discord/flags.py

Lines changed: 212 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,24 @@ def forwarded(self):
713713
"""
714714
return 16384
715715

716+
@flag_value
717+
def components_v2(self):
718+
""":class:`bool`: Returns ``True`` if the message has Discord's v2 components.
719+
720+
Does not allow sending any ``content``, ``embed``, ``embeds``, ``stickers``, or ``poll``.
721+
722+
.. versionadded:: 2.1
723+
"""
724+
return 32768
725+
726+
@flag_value
727+
def social_layer_integration(self):
728+
""":class:`bool`: Returns ``True`` if the message is sent via the Social Layer Integration.
729+
730+
.. versionadded:: 2.1
731+
"""
732+
return 65536
733+
716734

717735
@fill_with_flags()
718736
class PublicUserFlags(BaseFlags):
@@ -885,6 +903,8 @@ def active_developer(self):
885903
""":class:`bool`: Returns ``True`` if the user is an active developer.
886904
887905
.. versionadded:: 2.0
906+
907+
.. deprecated:: 2.1
888908
"""
889909
return UserFlags.active_developer.value
890910

@@ -1370,6 +1390,14 @@ def group_dm_create(self):
13701390
""":class:`bool`: Returns ``True`` if the application has the ability to create group DMs without limit."""
13711391
return 1 << 4
13721392

1393+
@flag_value
1394+
def rpc_private_beta(self):
1395+
""":class:`bool`: Returns ``True`` if the application can use the ``rpc`` scope without limitation.
1396+
1397+
.. versionadded:: 2.1
1398+
"""
1399+
return 1 << 5
1400+
13731401
@flag_value
13741402
def automod_badge(self):
13751403
""":class:`bool`: Returns ``True`` if the application has created at least 100 automod rules across all guilds.
@@ -1410,6 +1438,14 @@ def social_layer_integration_limited(self):
14101438
"""
14111439
return 1 << 10
14121440

1441+
@flag_value
1442+
def cloud_gaming_demo(self):
1443+
""":class:`bool`: Returns ``True`` if the application is trialing cloud gaming features.
1444+
1445+
.. versionadded:: 2.1
1446+
"""
1447+
return 1 << 11
1448+
14131449
@flag_value
14141450
def gateway_presence(self):
14151451
""":class:`bool`: Returns ``True`` if the application is verified and is allowed to
@@ -1495,24 +1531,52 @@ def active_grace_period(self):
14951531

14961532
@flag_value
14971533
def iframe_modal(self):
1498-
""":class:`bool`: Returns ``True`` if the application can use iframes within modals."""
1534+
""":class:`bool`: Returns ``True`` if the application can use iframes within modals.
1535+
1536+
.. versionadded:: 2.1
1537+
"""
14991538
return 1 << 26
15001539

15011540
@flag_value
15021541
def social_layer_integration(self):
1503-
""":class:`bool`: Returns ``True`` if the application can use the social layer SDK."""
1542+
""":class:`bool`: Returns ``True`` if the application can use the social layer SDK.
1543+
1544+
.. versionadded:: 2.1
1545+
"""
15041546
return 1 << 27
15051547

15061548
@flag_value
15071549
def promoted(self):
1508-
""":class:`bool`: Returns ``True`` if the application is promoted by Discord."""
1550+
""":class:`bool`: Returns ``True`` if the application is promoted by Discord.
1551+
1552+
.. versionadded:: 2.1
1553+
"""
15091554
return 1 << 29
15101555

15111556
@flag_value
15121557
def partner(self):
1513-
""":class:`bool`: Returns ``True`` if the application is a Discord partner."""
1558+
""":class:`bool`: Returns ``True`` if the application is a Discord partner.
1559+
1560+
.. versionadded:: 2.1
1561+
"""
15141562
return 1 << 30
15151563

1564+
@flag_value
1565+
def parent(self):
1566+
""":class:`bool`: Returns ``True`` if the application is a parent application.
1567+
1568+
.. versionadded:: 2.1
1569+
"""
1570+
return 1 << 33
1571+
1572+
@flag_value
1573+
def disable_relationship_access(self):
1574+
""":class:`bool`: Returns ``True`` if the application cannot access relationship information.
1575+
1576+
.. versionadded:: 2.1
1577+
"""
1578+
return 1 << 34
1579+
15161580

15171581
@fill_with_flags()
15181582
class ActivityFlags(BaseFlags):
@@ -1652,16 +1716,80 @@ class ChannelFlags(BaseFlags):
16521716

16531717
__slots__ = ()
16541718

1719+
@flag_value
1720+
def guild_feed_removed(self):
1721+
""":class:`bool`: Returns ``True`` if the guild channel is hidden from the guild's feed.
1722+
1723+
.. versionadded:: 2.1
1724+
"""
1725+
return 1 << 0
1726+
16551727
@flag_value
16561728
def pinned(self):
16571729
""":class:`bool`: Returns ``True`` if the thread is pinned to the forum channel."""
16581730
return 1 << 1
16591731

1732+
@flag_value
1733+
def active_channels_removed(self):
1734+
""":class:`bool`: Returns ``True`` if the guild channel has been removed from the guild's active channels.
1735+
1736+
.. versionadded:: 2.1
1737+
"""
1738+
return 1 << 2
1739+
16601740
@flag_value
16611741
def require_tag(self):
16621742
""":class:`bool`: Returns ``True`` if a tag is required to be specified when creating a thread in a :class:`ForumChannel`."""
16631743
return 1 << 4
16641744

1745+
@flag_value
1746+
def spam(self):
1747+
""":class:`bool`: Returns ``True`` if the channel is marked as spam.
1748+
1749+
.. versionadded:: 2.1
1750+
"""
1751+
return 1 << 5
1752+
1753+
@flag_value
1754+
def guild_resource_channel(self):
1755+
""":class:`bool`: Returns ``True`` if the guild channel is used as a read-only resource for onboarding and is not shown in the channel list.
1756+
1757+
.. versionadded:: 2.1
1758+
"""
1759+
return 1 << 7
1760+
1761+
@flag_value
1762+
def clyde_ai(self):
1763+
""":class:`bool`: Returns ``True`` if the channel is created by Clyde AI, which has full access to all message content.
1764+
1765+
.. versionadded:: 2.1
1766+
"""
1767+
return 1 << 8
1768+
1769+
@flag_value
1770+
def summaries_disabled(self):
1771+
""":class:`bool`: Returns ``True`` if the guild channel has summaries disabled.
1772+
1773+
.. versionadded:: 2.1
1774+
"""
1775+
return 1 << 11
1776+
1777+
@flag_value
1778+
def role_subscription_template_preview_channel(self):
1779+
""":class:`bool`: Returns ``True`` if the role subscription tier for this guild channel has not been published yet.
1780+
1781+
.. versionadded:: 2.1
1782+
"""
1783+
return 1 << 13
1784+
1785+
@flag_value
1786+
def broadcasting(self):
1787+
""":class:`bool`: Returns ``True`` if the group DM is used for broadcasting a live stream.
1788+
1789+
.. versionadded:: 2.1
1790+
"""
1791+
return 1 << 14
1792+
16651793
@flag_value
16661794
def hide_media_download_options(self):
16671795
""":class:`bool`: Returns ``True`` if the client hides embedded media download options in a :class:`ForumChannel`.
@@ -1671,6 +1799,22 @@ def hide_media_download_options(self):
16711799
"""
16721800
return 1 << 15
16731801

1802+
@flag_value
1803+
def join_request_interview_channel(self):
1804+
""":class:`bool`: Returns ``True`` if the group DM is used for guild join request interviews.
1805+
1806+
.. versionadded:: 2.1
1807+
"""
1808+
return 1 << 16
1809+
1810+
@flag_value
1811+
def moderator_report_channel(self):
1812+
""":class:`bool`: Returns ``True`` if the forum channel is the guild's moderator queue.
1813+
1814+
.. versionadded:: 2.1
1815+
"""
1816+
return 1 << 19
1817+
16741818

16751819
@fill_with_flags()
16761820
class PaymentSourceFlags(BaseFlags):
@@ -1825,6 +1969,14 @@ def premium_subscription(self):
18251969
"""
18261970
return 1 << 6
18271971

1972+
@alias_flag_value
1973+
def available_for_premium_gifting(self):
1974+
""":class:`bool`: An alias for :attr:`premium_subscription`.
1975+
1976+
.. versionadded:: 2.1
1977+
"""
1978+
return 1 << 6
1979+
18281980
@flag_value
18291981
def application_guild_subscription(self):
18301982
""":class:`bool`: Returns ``True`` if the SKU is a application subscription. These are subscriptions made to applications for premium perks bound to a guild."""
@@ -1852,6 +2004,14 @@ def guild_product(self):
18522004
"""
18532005
return 1 << 10
18542006

2007+
@flag_value
2008+
def available_for_application_gifting(self):
2009+
""":class:`bool`: Returns ``True`` if the SKU is a giftable application product.
2010+
2011+
.. versionadded:: 2.1
2012+
"""
2013+
return 1 << 11
2014+
18552015

18562016
@fill_with_flags()
18572017
class PaymentFlags(BaseFlags):
@@ -2854,6 +3014,34 @@ def guest(self):
28543014
"""
28553015
return 1 << 4
28563016

3017+
@flag_value
3018+
def started_home_actions(self):
3019+
""":class:`bool`: Returns ``True`` if the member has started the new member actions in the server guide."""
3020+
return 1 << 5
3021+
3022+
@flag_value
3023+
def completed_home_actions(self):
3024+
""":class:`bool`: Returns ``True`` if the member has completed all of the new member actions in the server guide."""
3025+
return 1 << 6
3026+
3027+
@flag_value
3028+
def automod_quarantined_name(self):
3029+
""":class:`bool`: Returns ``True`` if the member's has been
3030+
quarantined by AutoMod due to their username, display name, or nickname.
3031+
3032+
.. versionadded:: 2.1
3033+
"""
3034+
return 1 << 7
3035+
3036+
@flag_value
3037+
def dm_settings_upsell_acknowledged(self):
3038+
""":class:`bool`: Returns ``True`` if the member has acknowledged the DM privacy settings upsell modal.
3039+
3040+
.. versionadded:: 2.1
3041+
"""
3042+
return 1 << 9
3043+
3044+
@flag_value
28573045
def automod_quarantined_guild_tag(self):
28583046
""":class:`bool`: Returns ``True`` if the member's has been
28593047
quarantined by AutoMod due to their guild tag.
@@ -3078,6 +3266,16 @@ def animated(self):
30783266
""":class:`bool`: Returns ``True`` if the attachment is an animated image."""
30793267
return 1 << 5
30803268

3269+
@flag_value
3270+
def contains_gore_content(self):
3271+
""":class:`bool`: Returns ``True`` if the attachment is flagged as gore content."""
3272+
return 1 << 6
3273+
3274+
@flag_value
3275+
def contains_self_harm_content(self):
3276+
""":class:`bool`: Returns ``True`` if the attachment is flagged as self-harm content."""
3277+
return 1 << 7
3278+
30813279

30823280
@fill_with_flags()
30833281
class EmbedFlags(BaseFlags):
@@ -3140,6 +3338,16 @@ def content_inventory_entry(self):
31403338
""":class:`bool`: Returns ``True`` if the embed is a legacy content inventory entry."""
31413339
return 1 << 5
31423340

3341+
@flag_value
3342+
def contains_gore_content(self):
3343+
""":class:`bool`: Returns ``True`` if the embed was flagged as gore content."""
3344+
return 1 << 6
3345+
3346+
@flag_value
3347+
def contains_self_harm_content(self):
3348+
""":class:`bool`: Returns ``True`` if the embed was flagged as self-harm content."""
3349+
return 1 << 7
3350+
31433351

31443352
@fill_with_flags()
31453353
class RoleFlags(BaseFlags):

0 commit comments

Comments
 (0)