Reputation: 57
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
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