Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum options not setting input_type to a SlashCommandOptionType #1428

Merged

Conversation

Middledot
Copy link
Member

Summary

An enum option with a default value:

async def command(ctx, opt = discord.Option(ThisEnum, default=ThisEnum.value):

errors with AttributeError: type object 'str' has no attribute 'value'

Checklist

  • 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
  • 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, ...)

...to the respective enum
@Middledot Middledot added the bug Something isn't working label Jun 18, 2022
@Lulalaby Lulalaby enabled auto-merge (rebase) June 18, 2022 02:23
@Lulalaby Lulalaby merged commit d518ba5 into Pycord-Development:master Jun 18, 2022
@Middledot Middledot deleted the fix-enums-breaking-again branch June 18, 2022 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants