小编Dri*_*mov的帖子

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)

但它表明了这一点: 在此输入图像描述

那么如何才能像第一张图片那样改变第二张图片的时间呢?

python embed discord.py

2
推荐指数
1
解决办法
4万
查看次数

Discord.py 获取消息链接

我已经为我的discord.py 机器人制作了一个右板,现在我想添加一个“跳转到内容”行来重定向到消息,这是我当前的代码:

\n
@client.event\nasync def on_reaction_add(reaction, member):\n    schannel = client.get_channel(channel_id)\n    \n    if (reaction.emoji == '\xe2\xad\x90') and (reaction.count >= 3):\n        embed = discord.Embed(color = 15105570)\n        embed.set_author(name = reaction.message.author.name, icon_url = reaction.message.author.avatar_url)\n        embed.add_field(name = "Message Content", value = reaction.message.content)\n        \n        if len(reaction.message.attachments) > 0:\n            embed.set_image(url = reaction.message.attachments[0].url)\n        \n        embed.set_footer(text = f" \xe2\xad\x90 {reaction.count} | # {reaction.message.channel.name}")\n        embed.timestamp = datetime.datetime.utcnow()\n        await schannel.send(embed = embed)\n
Run Code Online (Sandbox Code Playgroud)\n

请帮我解决这个问题,预先感谢:)

\n

python discord.py

1
推荐指数
1
解决办法
6949
查看次数

标签 统计

discord.py ×2

python ×2

embed ×1