#TOPIC
1 messages · Page 1 of 1 (latest)
var messageProperties = {
embeds: [embed],
components: [buttons],
}
var authorObject = {}
if (npc.title) {
var title = npc.title
authorObject.name = title
}
if (npc.tier) {
var tier = npc.tier
var authorIcon = new MessageAttachment(`C:/Users/jvcal/Documents/Cool Images/Tiers/${tier}.png`)
authorObject.iconURL = `attachment://${tier}`
messageProperties.files = [authorIcon]
}
try {
embed.setAuthor(authorObject)
if (!message.attachments.size < 1) {
var file = new MessageAttachment(message.attachments.first().url)
embed.setImage(`attachment://${message.attachments.first().url.replace(/https:\/\/.*\//, '')}`)
messageProperties.files.push(file)
}
const mainMessage = await message.channel.send(messageProperties)```
Function
and the error?
and what is the intended output?
The roman 5 inside the authorIcon field
and where should it be displayed
since you already have a image set
I mean
As I said
in the author icon
lol
there's an author icon field isn't there
yeah
<:_:874569335308431382> MessageEmbed#setAuthor()
Sets the author of this embed.
what
yeah so the image is in the message and not in the embed
yeah that makes a lot of sense
lol what the
authorObject.iconURL = `attachment://${tier}`
and unless im stupid, the attachment is set to a number
not a file
so what should I do exactly?
I feel so dumb rn lol
it still gives the same output
so, you see the title goes in
so we have this
authorObject.iconURL = `attachment://${tier}`
messageProperties.files = [authorIcon]
my guess would be that the goal was
authorUbject.iconURL = authorIcon
(i think, i have a feeling that isnt how iconURL works)
Why does it matter reee
best idea is to probably just throw them all in a channel and copy the links
so you can actually put them in an embed
there most likely is a better way
exept im stupid
lemme just check something real quick
<:_:874569296821501952> MessageAttachment
Represents an attachment in a message.
LOL ok
So, we didn't get any errors, but the icon isn't there. Should I try resizing it?
var authorIcon = new MessageAttachment(`C:/Users/jvcal/Documents/Cool Images/Tiers/${tier}.png`)
authorObject.iconURL = authorIcon.url```
no thats definitely not the issue
weird thing is
this above is working:
var authorObject = {}
if (npc.title) {
var title = npc.title
authorObject.name = title
}
"O juiz do Tempo" is the title
but then when we go to the iconURL part it just doesn't
looks like you didnt do what i said initially
var authorIcon = new MessageAttachment(`C:/Users/jvcal/Documents/Cool Images/Tiers/${tier}.png`, 'icon.png')
authorObject.iconURL = `attachment://${authorIcon.name}`
messageProperties.files = [authorIcon]
I tried that, let me show you
welp, it worked now. What a fucking surprise 
Thank you so much @zenith dock
how do I resize this? It's looking weird
using any image editing software