问题标题定义了问题。我安装discord.py模块时如下所示:
pip install -U git+https://github.com/Rapptz/discord.py
但是,当我试图运行代码时:
import discord
class JoinQueue_Button(discord.ui.View):
@discord.ui.button(label='Join This Game!', style=discord.ButtonStyle.green)
async def queue(self, interaction: discord.Interaction):
current_queue = {}
await interaction.user.id我收到一个错误,说ui模块不存在。我现在不知道该怎么办。
发布于 2021-09-22 20:01:58
我想这可能已经过时了。
尝试并运行下一个命令: pip install --升级discord.py
发布于 2021-09-22 20:05:02
发布于 2022-05-11 19:26:02
我解决了运行这个问题
python3 -m pip install -U py-cord --prehttps://stackoverflow.com/questions/69290541
复制相似问题