AngleBoost
AngleBoost

Reputation: 57

ImportError: cannot import name 'app_commands' from 'discord'

For some reason I'm getting a error when importing app_commands

from discord import app_commands

Error message:

Traceback (most recent call last):
  File "c:\Users\vwv42\OneDrive\Desktop\AutoMod\main.py", line 8, in <module>
    from discord import app_commands
ImportError: cannot import name 'app_commands' from 'discord' (C:\Users\vwv42\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\__init__.py)

Upvotes: 2

Views: 10889

Answers (2)

Berserkeras
Berserkeras

Reputation: 31

I resolved the error by updating from 3.7.

Upvotes: 3

Leg3ndary
Leg3ndary

Reputation: 213

I would check that you have the beta of discord.py installed using:

pip show discord

If you get anything other than 2.0.0 you need to install the latest version which has app_commands

pip install git+https://github.com/Rapptz/discord.py

Upvotes: 7

Related Questions