【发布时间】:2020-06-16 11:27:58
【问题描述】:
代码:
# Random Choice
@client.command(aliases=["rand_c"])
async def random_choice(ctx, python_list):
await ctx.send(random.choice(python_list))
当我输入正确的 Python 列表时出现奇怪的错误([“Cats”、“Dogs”、“No pet”]):
discord.ext.commands.errors.UnexpectedQuoteError: Unexpected quote mark, '"', in non-quoted string
它在常规 Python 中运行良好,但在 discord.py 中为什么不行?
【问题讨论】:
标签: python-3.x discord.py-rewrite