Skip to content

fix: Snowflake encoding issue when msgspec is used fix #1562

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

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

Lacosst0
Copy link
Contributor

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

This PR fixes sending StringSelectOption with CustomEmoji when msgspec is installed (used)

Changes

  • Added isinstance check to enc_hook in interactions\client\utils\input_utils.py

Related Issues

#1561

Test Scenarios

@slash_command()
async def test(ctx: SlashContext):
    await ctx.respond(
        components=StringSelectMenu(
            StringSelectOption(label="test", value="test_value", emoji=(await ctx.guild.fetch_all_custom_emojis())[0]) # test emoji
        )
    )

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

Signed-off-by: Lacosst0 <68904262+Lacosst0@users.noreply.github.com>
@Developer89899
Copy link
Contributor

Looks good. I'll test it tonight

Signed-off-by: Lacosst0 <68904262+Lacosst0@users.noreply.github.com>
@Developer89899 Developer89899 merged commit 0cea688 into interactions-py:unstable Nov 16, 2023
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.

3 participants