【发布时间】:2021-06-09 05:02:37
【问题描述】:
我的代码:
@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.")
这个命令的问题是机器人不会读取整个消息,它只读取它的第一个单词。
例如,我发送此消息:=suggest this is suggestion 并且 bot 仅使用第一个单词向所有者发送嵌入,在这种情况下,它将仅发送带有 this 的嵌入,而不是整个句子。如果可以,怎么做?
【问题讨论】:
标签: python python-3.x discord.py