Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 不协调建议命令_Python_Python 3.x_Discord.py - Fatal编程技术网

Python 不协调建议命令

Python 不协调建议命令,python,python-3.x,discord.py,Python,Python 3.x,Discord.py,我的代码: @client.command() async def suggest(ctx, suggestion): embed = discord.Embed( title = "New suggestion.", description = f"{suggestion}", color = 0, timestamp = ctx.message.created_at )

我的代码:

@client.command()
async def suggest(ctx, suggestion):
    embed = discord.Embed(
        title = "New suggestion.",
        description = f"{suggestion}",
        color = 0,
        timestamp = ctx.message.created_at
    )
    embed.set_footer(text='Requested by {} | ID-{}' .format(ctx.message.author, ctx.message.author.id))

    await ctx.guild.owner.send(embed=embed)
    await ctx.send("Suggestion sent to server owner.")
这个命令的问题是bot不会读取整个消息,它只读取消息的第一个字。
例如,我发送此消息:
=suggest this is suggestion
,bot仅使用第一个单词向所有者发送嵌入,在这种情况下,它将仅使用
而不是整个句子发送嵌入。如果可能,如何传递?

您可以只传递关键字参数

异步定义建议(ctx,*,建议):

查看

您可以只传递关键字参数

异步定义建议(ctx,*,建议):
看一看