Skip to content

Commit 44c1f49

Browse files
committed
Merge remote-tracking branch 'origin/developer' into oauth2
# Conflicts: # discord/application_commands.py # docs/index.rst # images/flag_ua.png
2 parents 6f46f50 + 1e019ea commit 44c1f49

File tree

5 files changed

+95
-9
lines changed

5 files changed

+95
-9
lines changed

discord/application_commands.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@
7575
'GuildOnlySubCommand',
7676
'UserCommand',
7777
'MessageCommand',
78-
'generate_options',
79-
'GuildAppCommandPermissions',
80-
'AppCommandPermission'
78+
'generate_options'
8179
)
8280

8381
api_docs = 'https://discord.com/developers/docs'
@@ -129,7 +127,8 @@ class Localizations:
129127
130128
"""
131129

132-
__slots__ = tuple([locale_name for locale_name in getattr(Locale, '_enum_member_map_')] + ['__languages_dict__']) # type: ignore
130+
__slots__ = tuple([locale_name for locale_name in Locale._enum_member_map_] + ['__languages_dict__']
131+
) # type: ignore
133132

134133
def __init__(self, **localizations) -> None:
135134

discord/channel.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ async def edit(self, *, reason=None, **options):
15011501
await self._edit(options, reason=reason)
15021502

15031503

1504-
class StageChannel(VocalGuildChannel):
1504+
class StageChannel(VocalGuildChannel, abc.Messageable):
15051505
"""Represents a Discord guild stage channel.
15061506
15071507
.. versionadded:: 1.7
@@ -1547,7 +1547,7 @@ class StageChannel(VocalGuildChannel):
15471547
The region for the stage channel's voice communication.
15481548
A value of ``None`` indicates automatic voice region detection.
15491549
"""
1550-
__slots__ = ('topic',)
1550+
__slots__ = ('topic', 'last_message_id')
15511551

15521552
def __repr__(self):
15531553
attrs = [
@@ -1561,15 +1561,18 @@ def __repr__(self):
15611561
('category_id', self.category_id)
15621562
]
15631563
return '<%s %s>' % (self.__class__.__name__, ' '.join('%s=%r' % t for t in attrs))
1564-
1564+
15651565
def _update(self, guild, data):
15661566
super()._update(guild, data)
15671567
self.topic = data.get('topic')
15681568

15691569
@staticmethod
15701570
def channel_type():
15711571
return ChannelType.stage_voice
1572-
1572+
1573+
async def _get_channel(self):
1574+
return self
1575+
15731576
@property
15741577
def requesting_to_speak(self):
15751578
"""List[:class:`Member`]: A list of members who are requesting to speak in the stage channel."""
@@ -1629,6 +1632,7 @@ async def edit(self, *, reason=None, **options):
16291632

16301633
await self._edit(options, reason=reason)
16311634

1635+
16321636
class CategoryChannel(abc.GuildChannel, Hashable):
16331637
"""Represents a Discord channel category.
16341638

discord/enums.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,14 @@ class MessageType(Enum):
634634
guild_invite_reminder = 22
635635
context_menu_command = 23
636636
automoderation_action = 24
637-
637+
role_subscription_purchase = 25
638+
interaction_premium_upsell = 26
639+
stage_start = 27
640+
stage_end = 28
641+
stage_speaker_change = 29
642+
stage_raise_hand = 30
643+
stage_topic_change = 31
644+
guild_application_premium_subscription = 32
638645

639646

640647
class VoiceRegion(Enum):

docs/api.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,82 @@ of :class:`enum.Enum`.
11831183
Discovery requirements for 3 weeks in a row.
11841184

11851185
.. versionadded:: 1.7
1186+
.. attribute:: thread_created
1187+
1188+
The system message denoting that a thread has been created.
1189+
1190+
.. versionadded:: 2.0
1191+
.. attribute:: reply
1192+
1193+
A message that is a reply to another message.
1194+
1195+
.. versionadded:: 2.0
1196+
.. attribute:: chat_input_command
1197+
1198+
A message that is a slash command.
1199+
1200+
.. versionadded:: 2.0
1201+
.. attribute:: thread_starter_message
1202+
1203+
A message that is the first message in a thread.
1204+
1205+
.. versionadded:: 2.0
1206+
.. attribute:: guild_invite_reminder
1207+
1208+
The system message denoting that a guild invite reminder has been sent.
1209+
1210+
.. versionadded:: 2.0
1211+
.. attribute:: context_menu_command
1212+
1213+
A message that is a context menu command.
1214+
1215+
.. versionadded:: 2.0
1216+
.. attribute:: automoderation_action
1217+
1218+
A log message from discords auto moderation system.
1219+
1220+
.. versionadded:: 2.0
1221+
.. attribute:: role_subscription_purchase
1222+
1223+
A message informing about a role subscription purchase.
1224+
1225+
.. versionadded:: 2.0
1226+
.. attribute:: interaction_premium_upsell
1227+
1228+
A message informing about a premium upsell.
1229+
1230+
.. versionadded:: 2.0
1231+
.. attribute:: stage_start
1232+
1233+
A message informing about a stage starting.
1234+
1235+
.. versionadded:: 2.0
1236+
.. attribute:: stage_end
1237+
1238+
A message informing about a stage ending.
1239+
1240+
.. versionadded:: 2.0
1241+
.. attribute:: stage_speaker_change
1242+
1243+
A message informing about a stage having a new speaker.
1244+
1245+
.. versionadded:: 2.0
1246+
.. attribute:: stage_raise_hand
1247+
1248+
A message informing about someone raising their hand in a stage.
1249+
1250+
.. versionadded:: 2.0
1251+
.. attribute:: stage_topic_change
1252+
1253+
A message informing about the topic of a stage been changed.
1254+
1255+
.. versionadded:: 2.0
1256+
.. attribute:: guild_application_premium_subscription
1257+
1258+
The system message denoting that a member has subscribed to a guild application.
1259+
1260+
.. versionadded:: 2.4
1261+
11861262

11871263
.. class:: ComponentType
11881264

images/flag_ua.png

-863 Bytes
Loading

0 commit comments

Comments
 (0)