Kontra
Kontra

Reputation: 25

How do i make image bigger using setimage discord.js

I've tried to set images into my embed like this: Embed.setImage(bot.users.cache.get(User.id).displayAvatarURL({dynamic: true}), 200, 200); it works perfectly fine, but honestly the image is small when displayed on discord. does anyone know how to make it bigger? I have searched everywhere and couldn't find any docs that tells me how to set it. I've seen bots display my avatar bigger than my bot does.

I will be thankful for any answers!

Upvotes: 2

Views: 10024

Answers (2)

user15789777
user15789777

Reputation:

From what I have experienced avatars that are usually small ( if the users have a cropped image) the image will be small I used this-

.setImage(message.author.displayAvatarURL({size:1024,dynamic:true}))

Upvotes: 0

user13429955
user13429955

Reputation:

Well you code either rewrite the image with node-canvas or use the size attribute when getting displayAvatarURL stated here:

https://discord.js.org/#/docs/main/stable/typedef/ImageURLOptions

//if User is a instance of a user class and it's not partial why not 
//just use User.displayAvatarURL() ?
const user = bot.users.cache.get(User.id);
const url = user.displayAvatarURL({ dynamic: true, size: 256});
new MessageEmbed()
   .setImage(url);

Upvotes: 1

Related Questions