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,*,建议):
看一看