我正在尝试使用python为我的不和谐机器人创建民意测验cmd。我不知道自己在做什么错:我没有收到任何错误,但该机器人只是不发送“文本”。这是我的代码:
@command(name="createpoll", aliases=["mkpoll"])
@has_permissions(manage_guild=True)
async def create_poll(self, ctx, question, *options):
if len(options) > 10:
await ctx.send("Du kannst nur maximal 3 Antwortmöglichkeiten angeben")
else:
embed = Embed(title="Poll",
description=question,
colour=ctx.author.colour,
timestamp=datetime.utcnow())
fields = [("Options", "\n".join([f"{numbers[idx]} {option}" for idx, option in enumerate(options)]), False),
("Anleitung", "Reagiere, um deine Stimme abzugeben", False)]
for name, value, inline in fields:
embed.add_field(name=name, value=value, inline=inline)
await ctx.send(embed=embed)