我所拥有的进口:
import discord
import discord.ext.commands
from discord.ext import typed_commands
from discord.ext import commands
import discord.utils
import config
from discord.ext import commands
from discord_buttons_plugin import *
import youtube_dl
from discord.ext.commands import bot
from disco
代码:
@bot.command(name="whois")
async def whois(ctx,user:nextcord.Member=None):
if user==None:
user=ctx.author
rlist = []
for role in user.roles:
if role.name != "@everyone":
rlist.append(role.mention)
b = ", ".join(rlist)
embed =
如何解决这个问题?当我运行我的discord机器人时,它出现在终端中 DistributionWarning: discord.py is installed which is incompatible with nextcord. Please remove this library by using pip3 uninstall discord.py
warn(message, DistributionWarning, stacklevel=0)
我想在产品商店到达其中一个边界时禁用该按钮,并且您不能再单击"Next Page“或"Past Page”按钮。但是由于您不能将实例变量传递给装饰器,所以我不能比较值并将它们传递给@nextcord.ui.button。你能帮我解决这个问题吗?下面是我的代码: import nextcord
from nextcord.ext import commands
from SupportClasses import BuildShop as bd
from SupportClasses import Build
class ShopBuildings(commands.Cog)
我正在尝试创建一个斜杠命令(/test),并得到一个TypeError。
我的代码:
import nextcord
from nextcord.utils import get
client=nextcord.Client(intents=nextcord.Intents.all())
@client.slash_command(name="test")
async def test(interaction:nextcord.Interaction):
if interaction.user in get(interaction.guild.roles, name=&