Dri*_*mov 2 python embed discord.py
这是我当前的代码:
time = datetime.datetime.utcnow()
embed.set_footer(text = time, icon_url = "https://i.imgur.com/uZIlRnK.png")
Run Code Online (Sandbox Code Playgroud)
那么如何才能像第一张图片那样改变第二张图片的时间呢?
Abd*_*ziz 10
您应该使用Embed.timestampwhich 接受一个datetime.datetime对象。
您有两种添加方法
第一种方式:
embed = discord.Embed(title='test',timestamp=datetime.datetime.utcnow())
embed.set_footer(text='\u200b',icon_url="https://i.imgur.com/uZIlRnK.png")
Run Code Online (Sandbox Code Playgroud)
第二种方式:
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text='\u200b',icon_url="https://i.imgur.com/uZIlRnK.png")
Run Code Online (Sandbox Code Playgroud)
注意:\u200b只是一个空行。
编辑:
添加页脚图标。