Skip to content

fix: Single Member Enums Fail Converting To Option#2577

Merged
Lulalaby merged 8 commits into
Pycord-Development:masterfrom
Icebluewolf:EnumDocStringFix
Sep 16, 2024
Merged

fix: Single Member Enums Fail Converting To Option#2577
Lulalaby merged 8 commits into
Pycord-Development:masterfrom
Icebluewolf:EnumDocStringFix

Conversation

@Icebluewolf

@Icebluewolf Icebluewolf commented Sep 16, 2024

Copy link
Copy Markdown
Member

Summary

This fixes an issue where a Enum with one member that is not of a type accepted by discord an error would be thrown during option conversion.
It also solves #2558

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@plun1331 plun1331 linked an issue Sep 16, 2024 that may be closed by this pull request
3 tasks
Comment thread discord/commands/options.py Outdated
Co-authored-by: Dorukyum <[email protected]>
Signed-off-by: Ice Wolfy <[email protected]>
@Lulalaby
Lulalaby enabled auto-merge (squash) September 16, 2024 16:01
@Lulalaby
Lulalaby merged commit 96180fb into Pycord-Development:master Sep 16, 2024
@Icebluewolf
Icebluewolf deleted the EnumDocStringFix branch September 16, 2024 17:33
baribarton pushed a commit to baribarton/pycord-no-potential-reconnect that referenced this pull request Oct 24, 2024
…t#2577)

* fix: Check If Enum Has Docstring Before Using It As Option Description

* fix: Single Item Enums Of Invalid Types Not Converting To String

* chore: Update Changelog

* style(pre-commit): auto fixes from pre-commit.com hooks

* chore: I Used The Wrong PR Number

* Update discord/commands/options.py

Co-authored-by: Dorukyum <[email protected]>
Signed-off-by: Ice Wolfy <[email protected]>

---------

Signed-off-by: Ice Wolfy <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dorukyum <[email protected]>
OmLanke pushed a commit to OmLanke/pycord that referenced this pull request Dec 16, 2024
…t#2577)

* fix: Check If Enum Has Docstring Before Using It As Option Description

* fix: Single Item Enums Of Invalid Types Not Converting To String

* chore: Update Changelog

* style(pre-commit): auto fixes from pre-commit.com hooks

* chore: I Used The Wrong PR Number

* Update discord/commands/options.py

Co-authored-by: Dorukyum <[email protected]>
Signed-off-by: Ice Wolfy <[email protected]>

---------

Signed-off-by: Ice Wolfy <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dorukyum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declaring an enum option with no docstring causes an error

3 participants