python - 不和谐的建议命令
问题描述
我的代码:
@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
并且机器人仅使用第一个单词向所有者发送嵌入,在这种情况下,它将仅发送嵌入this
而不是整个句子。如果可能,怎么做?
解决方案
推荐阅读
- kotlin - 如何在 kotlin 中获得价值?
- java - 在第一个位置插入元素时返回不正确的链接列表
- mysql - 更新缺失行的数据库的最佳方法
- javascript - 反应过渡组过渡动画无法退出
- sql - 组合/折叠行与 group_by + 以列为下一行的条件
- python - pandas.io.sql 中哪个方法等价于 mysqlDB fetchone()
- node.js - Node js服务不返回任何东西
- excel - Excel 到 MS Access 连接:连接字符串中的空格问题
- powershell - VSCode 覆盖 PowerShell ExecutionPolicy
- r - 删除一系列时间戳,其中某个条件为 True