【发布时间】:2021-04-21 03:48:48
【问题描述】:
我有这个编辑狙击命令和事件,如果用户编辑消息它会狙击它。该事件运行良好,并将编辑后的消息发送到私人日志管理频道。但是,当我尝试将其变成命令并将嵌入发送到给定的命令通道中时,消息和命令根本不起作用
@commands.command()
async def es(self,message_before, message_after):
embed=discord.Embed(description=f"????**Message sent by** {author} **edited in** {channel}")
embed.set_author(name= f" {message_before.author.name}#{message_before.author.discriminator}")
embed.add_field(name="Old message", value=message_before.content, inline=False)
embed.add_field(name="New message", value=message_after.content, inline=False)
await message_before.channel.send(embed=embed)
return
【问题讨论】:
标签: python python-3.x discord discord.py