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

TypedDict does not support instance and class checks #1621

Closed
3 tasks done
plun1331 opened this issue Sep 6, 2022 · 0 comments · Fixed by #1622
Closed
3 tasks done

TypedDict does not support instance and class checks #1621

plun1331 opened this issue Sep 6, 2022 · 0 comments · Fixed by #1622
Labels
bug Something isn't working priority: high High Priority

Comments

@plun1331
Copy link
Member

plun1331 commented Sep 6, 2022

Summary

Exception that occurs in process_application_commands

Reproduction Steps

  • Create & run an application command
  • Must not have an on_application_command_error listener

Minimal Reproducible Code

import discord

bot = discord.Bot()

@bot.command()
async def slash_command(ctx):
   pass

bot.run(...)

Expected Results

Interaction is processed correctly

Actual Results

Exception is raised:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 382, in _run_event
    await coro(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/discord/bot.py", line 1058, in on_interaction
    if self.extra_events.get("on_application_command_error", None):
  File "/usr/local/lib/python3.10/site-packages/discord/bot.py", line 722, in process_application_commands
    guild_id == cmd.guild_ids or (isinstance(cmd.guild_ids, list) and guild_id in cmd.guild_ids)
  File "/usr/local/lib/python3.10/typing.py", line 2384, in __subclasscheck__
    raise TypeError('TypedDict does not support instance and class checks')
TypeError: TypedDict does not support instance and class checks

Intents

Irrelevant

System Information

Latest release (2.1.2)

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

@plun1331 plun1331 added unconfirmed bug A bug report that needs triaging bug Something isn't working priority: high High Priority and removed unconfirmed bug A bug report that needs triaging labels Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high High Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant