【发布时间】:2021-12-04 19:25:30
【问题描述】:
我正在用 Python 制作一个 Discord 机器人,目前,我想添加一个功能,当使用 _userinfo 命令时,机器人将发送有关用户的一般信息(他加入 Discord 的日期,他加入此服务器的日期,他的昵称和头像)
我目前有这个代码:
if message.content.startswith("_userinfo"):
emb14 = discord.Embed(
title=f"{message.author.mention} info",
colour=discord.Colour.dark_blue()
)
emb14.set_image(url=message.author.avatar_url)
emb14.add_field(name=f"{message.author.mention}", value=f"{message.author}", inline=True)
await message.channel.send(embed=emb14)
问题是昵称是 ID(但不是nickname#0000),而且我不知道如何添加服务器加入日期和 Discord 加入日期。有什么想法吗?
【问题讨论】: