Javascript Discord.JS嵌入:页脚中的用户化身
我正在尝试将我朋友为Discord机器人编写的一些PHP代码移植到DiscordJS。以下是他为嵌入式(PHP)编写的内容:Javascript Discord.JS嵌入:页脚中的用户化身,javascript,php,discord.js,embed,Javascript,Php,Discord.js,Embed,我正在尝试将我朋友为Discord机器人编写的一些PHP代码移植到DiscordJS。以下是他为嵌入式(PHP)编写的内容: $embed->setFooter($message->author->username,$av=$message->user->avatar) 我在尝试移植将用户头像添加到页脚的部分时遇到问题,我无法确定“AV”是什么,以及它如何将图像添加到文本开头。AV是给$embed->setFooter>的第二个参数。 [摘自文件] 在discord.js中,还有两个参数text
$embed->setFooter($message->author->username,$av=$message->user->avatar)代码>
我在尝试移植将用户头像添加到页脚的部分时遇到问题,我无法确定“AV”是什么,以及它如何将图像添加到文本开头。AV是给$embed->setFooter>的第二个参数。
[摘自文件]
在discord.js中,还有两个参数text:StringResolvable
和iconURL:string
iconURL
是可选参数
移植
$embed->setFooter($message->author->username,$av=$message->user->avatar)代码>
加上
embed.setFooter(message.author.username, message.user.displayAvatarURL());