字符 " 在 discord py 中给我一个错误
The charecter " is giving me an error in discord py
我有这个代码:
async def on_guild_channel_update(before, after):
channel = discord.utils.get(before.guild.channels, name="bot-logs")
embed=discord.Embed(title="Channel Name Updated", description="A channel name was updated.")
embed.add_field(name="Old name", value=f"The old name was: {before}.", inline=True)
embed.add_field(name="New name", value=f"The old name was: {after}.", inline=False)
await channel.send(embed=embed)
我收到这个错误
其他人说它应该可以正常工作,但有人知道为什么这对我不起作用吗?
如评论所述,您有python 3.5,3.6中引入了f字符串要升级,请转到python.org并下载python 3.6+的版本(将建议 3.8.3)。然后 运行 它,因为您已经安装了 python,您可以单击立即升级按钮,它会在您的计算机上安装它。希望你有 windows,我不知道它是否适用于 mac/linux
我有这个代码:
async def on_guild_channel_update(before, after):
channel = discord.utils.get(before.guild.channels, name="bot-logs")
embed=discord.Embed(title="Channel Name Updated", description="A channel name was updated.")
embed.add_field(name="Old name", value=f"The old name was: {before}.", inline=True)
embed.add_field(name="New name", value=f"The old name was: {after}.", inline=False)
await channel.send(embed=embed)
我收到这个错误
其他人说它应该可以正常工作,但有人知道为什么这对我不起作用吗?
如评论所述,您有python 3.5,3.6中引入了f字符串要升级,请转到python.org并下载python 3.6+的版本(将建议 3.8.3)。然后 运行 它,因为您已经安装了 python,您可以单击立即升级按钮,它会在您的计算机上安装它。希望你有 windows,我不知道它是否适用于 mac/linux