Skip to content

Commit f4d5624

Browse files
authored
Merge branch 'master' into voice_messages
2 parents 58aad56 + 96180fb commit f4d5624

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

CHANGELOG.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ possible (see our [Version Guarantees] for more info).
1010

1111
These changes are available on the `master` branch, but have not yet been released.
1212

13-
⚠️ **This Version Removes Support For Python 3.8** ⚠️
13+
⚠️ **This version removes support for Python 3.8.** ⚠️
1414

1515
### Added
1616

@@ -23,39 +23,50 @@ These changes are available on the `master` branch, but have not yet been releas
2323
- Added `Member.guild_banner` and `Member.display_banner` properties.
2424
([#2556](https://github.com/Pycord-Development/pycord/pull/2556))
2525

26+
### Fixed
27+
28+
- Fix `Enum` options not setting the correct type when only one choice is available.
29+
([#2577](https://github.com/Pycord-Development/pycord/pull/2577))
30+
2631
### Changed
2732

2833
- Renamed `cover` property of `ScheduledEvent` and `cover` argument of
2934
`ScheduledEvent.edit` to `image`.
3035
([#2496](https://github.com/Pycord-Development/pycord/pull/2496))
31-
- ⚠️ **This Version Removes Support For Python 3.8** ⚠️
36+
- ⚠️ **Removed support for Python 3.8.**
3237
([#2521](https://github.com/Pycord-Development/pycord/pull/2521))
3338

3439
### Deprecated
3540

3641
- Deprecated `AppInfo.summary` in favor of `AppInfo.description`.
3742
([#2520](https://github.com/Pycord-Development/pycord/pull/2520))
3843

44+
## [2.6.1] - 2024-09-15
45+
3946
### Fixed
4047

41-
- Fixed `EntitlementIterator` behavior with `limit > 100`.
48+
- Fixed premature garbage collection of tasks.
49+
([#2510](https://github.com/Pycord-Development/pycord/pull/2510))
50+
- Fixed `EntitlementIterator` type hints and behavior with `limit > 100`.
4251
([#2555](https://github.com/Pycord-Development/pycord/pull/2555))
4352
- Fixed missing `stacklevel` parameter in `warn_deprecated` function call inside
4453
`@utils.deprecated`. ([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
45-
- Fixed the typehint in `ConnectionState._polls` to reflect actual behavior, changing it
46-
from `Guild` to `Poll`.
54+
- Fixed the type hint in `ConnectionState._polls` to reflect actual behavior, changing
55+
it from `Guild` to `Poll`.
4756
([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
4857
- Fixed missing `__slots__` attributes in `RawReactionClearEmojiEvent` and
4958
`RawMessagePollVoteEvent`.
5059
([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
5160
- Fixed the type of `ForumChannel.default_sort_order`, changing it from `int` to
5261
`SortOrder`. ([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
53-
- Fixed `PartialMessage`s causing errors when created from `PartialMessageable`.
62+
- Fixed `PartialMessage` causing errors when created from `PartialMessageable`.
5463
([#2568](https://github.com/Pycord-Development/pycord/pull/2500))
5564
- Fixed the `guild` attribute of `Member`s recieved from a `UserCommand` being `None`.
5665
([#2573](https://github.com/Pycord-Development/pycord/pull/2573))
57-
- Fixed `Webhook.send` not including `Attachment` data.
66+
- Fixed `Webhook.send` not including attachment data.
5867
([#2513](https://github.com/Pycord-Development/pycord/pull/2513))
68+
- Fixed inverted type hints in `CheckAnyFailure`.
69+
([#2502](https://github.com/Pycord-Development/pycord/pull/2502))
5970

6071
## [2.6.0] - 2024-07-09
6172

discord/commands/options.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def __init__(
198198
enum_choices = []
199199
input_type_is_class = isinstance(input_type, type)
200200
if input_type_is_class and issubclass(input_type, (Enum, DiscordEnum)):
201-
if description is None:
201+
if description is None and input_type.__doc__ is not None:
202202
description = inspect.cleandoc(input_type.__doc__)
203203
if description and len(description) > 100:
204204
description = description[:97] + "..."
@@ -209,7 +209,9 @@ def __init__(
209209
)
210210
enum_choices = [OptionChoice(e.name, e.value) for e in input_type]
211211
value_class = enum_choices[0].value.__class__
212-
if all(isinstance(elem.value, value_class) for elem in enum_choices):
212+
if value_class in SlashCommandOptionType.__members__ and all(
213+
isinstance(elem.value, value_class) for elem in enum_choices
214+
):
213215
input_type = SlashCommandOptionType.from_datatype(
214216
enum_choices[0].value.__class__
215217
)

0 commit comments

Comments
 (0)