【发布时间】:2021-11-30 08:30:28
【问题描述】:
我一直在为我的 discord.py 机器人编写取消静音功能。完成后,我尝试运行它,并弹出此错误: “协程”对象不可调用
这是我的代码:
@bot.command(description="Unmutes a specified user.")
@commands(manage_messages=True)
async def unmute(ctx, member: discord.Member):
mutedRole = discord.utils.get(ctx.guild.roles, name="Muted")
await member.remove_roles(mutedRole)
await member.send(f" you have unmutedd from: - {ctx.guild.name}")
embed = discord.Embed(title="unmute", description=f" unmuted-{member.mention}",colour=discord.Colour.green())
await ctx.send(embed=embed)
我该怎么办?
【问题讨论】:
-
请包含整个错误消息。哪条生产线生产它?
-
不能把Python放到代码sn -p ????它仅适用于 html/css/javascript
-
好吧,我可以,所以
标签: python discord discord.py bots