vance_
vance_
DIAdiscord.js - Imagine an app
Created by vance_ on 2/5/2024 in #djs-questions
Problem with stats.js
Someone suggested this yesterday and it worked for me
7 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 2/5/2024 in #djs-questions
Problem with stats.js
If anyone has answers, feel free to ping me
7 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 2/5/2024 in #djs-questions
Problem with stats.js
My node version is 20.11.0 My discord.js version is 14.14.1
7 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
i fixed it by making the buffer the url itself
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
nevermind
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
im sorry this is my first time working with attachment builders
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
hmm, how do I make it into a buffer?
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
code for reference:
if (interaction.user.id === client.config.adminId) {
const buffer = await fetch(URL)

const attachment = new AttachmentBuilder(buffer, {
name: "spotify.png",
})

interaction.channel.send({
embeds: [
new EmbedBuilder()
.setImage(`attachment://${attachment.name}`)
.setDescription(`
Details: ${e[0].details}
Elapsed Time: ${formatDuration(Date.now() - e[0].timestamps.start.getTime())}
Start Time: ${e[0].timestamps.start.getTime()}
End Time: ${e[0].timestamps.end.getTime()}
Duration: ${formatDuration(duration)}
Album: ${e[0].assets.largeText}
Author: ${e[0].state}
`)
],
files: [attachment]
})
}
if (interaction.user.id === client.config.adminId) {
const buffer = await fetch(URL)

const attachment = new AttachmentBuilder(buffer, {
name: "spotify.png",
})

interaction.channel.send({
embeds: [
new EmbedBuilder()
.setImage(`attachment://${attachment.name}`)
.setDescription(`
Details: ${e[0].details}
Elapsed Time: ${formatDuration(Date.now() - e[0].timestamps.start.getTime())}
Start Time: ${e[0].timestamps.start.getTime()}
End Time: ${e[0].timestamps.end.getTime()}
Duration: ${formatDuration(duration)}
Album: ${e[0].assets.largeText}
Author: ${e[0].state}
`)
],
files: [attachment]
})
}
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
@qjuh I did what you said but now its throwing another error smh
TypeError [ReqResourceType]: The resource must be a string, Buffer or a valid file stream.
TypeError [ReqResourceType]: The resource must be a string, Buffer or a valid file stream.
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
yep
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
thats it?
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
so I have to do
attachment://${attachment.name}
attachment://${attachment.name}
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
ah alright
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
.setImage(attachment)
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
and then
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
const buffer = await fetch(URL)

const attachment = new AttachmentBuilder(buffer, {
name: "spotify.png",
})
const buffer = await fetch(URL)

const attachment = new AttachmentBuilder(buffer, {
name: "spotify.png",
})
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
@qjuh so I made a few changes, I added:
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
alright, thanks a lot
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
because I really do want it in my .setImage() thing
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
how shall i make it into a PNG?
32 replies