简体   繁体   English

如何让用户头像更大 | discord.js

[英]How to make user profile picture bigger | discord.js

The issue I am having is that every time I make the bot display someones avatar its significantly smaller to what other bots display like Dyno and sx4.我遇到的问题是,每次我让机器人显示某人的头像时,它都会比其他机器人(如 Dyno 和 sx4)显示的要小得多。 Example:例子:

在此处输入图像描述

How would I make the image bigger?(my bot is the one named "Azrael")我如何使图像更大?(我的机器人是名为“Azrael”的机器人)

Try: user.displayAvatarURL({size: 2048})试试: user.displayAvatarURL({size: 2048})

displayAvatarURL() method is better than avatarURL() because it also shows user's avatar if they have discord default one. displayAvatarURL() 方法比 avatarURL() 更好,因为如果他们有 discord 默认一个,它也会显示用户的头像。

https://discord.js.org/#/docs/main/stable/class/User?scrollTo=displayAvatarURL https://discord.js.org/#/docs/main/stable/class/User?scrollTo=displayAvatarURL

The MessageEmbedImage object has a height and width property you can set. MessageEmbedImage object有一个可以设置的heightwidth属性。 For more information on embed image objects, visit here有关嵌入图像对象的更多信息,请访问此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM