【发布时间】:2020-10-27 11:34:06
【问题描述】:
有人可以帮我解决这个问题,我只是想删除作者发送的执行命令的消息
@bot.command(description="Displays the test on_member_join message", aliases=['tw'], pass_context=True)
@commands.has_permissions(administrator=True)
async def test_welcome(ctx):
user = ctx.author
if user.bot:
pass
else:
now = datetime.now()
dt_string = now.strftime("on %d/%m/%Y at %H:%M")
embed = discord.Embed(description=f"{user.display_name} **Joined The Server**", colour=0x73D673)
embed.set_author(name=user.display_name, icon_url=user.avatar_url)
embed.set_thumbnail(url=thumbnail)
embed.add_field(name="User ID:", value=user.id)
embed.set_footer(text=dt_string)
#how to make it delete the message the user sent to excute this command
await ctx.send(embed=embed, delete_after=1)
【问题讨论】:
-
欢迎,错误是什么,你想要的输出是什么
标签: python discord.py discord.py-rewrite