yuki
yuki
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by yuki on 8/21/2023 in #djs-questions
Attach files with @discordjs/rest
that fixed the problem, ty
10 replies
DIAdiscord.js - Imagine an app
Created by yuki on 8/21/2023 in #djs-questions
Attach files with @discordjs/rest
alright ill try
10 replies
DIAdiscord.js - Imagine an app
Created by yuki on 8/21/2023 in #djs-questions
Attach files with @discordjs/rest
yeah ik, that would be diff case, i removed it when i attach the code here
10 replies
DIAdiscord.js - Imagine an app
Created by yuki on 8/21/2023 in #djs-questions
Attach files with @discordjs/rest
attachment variable is raw attachment from discord
10 replies
DIAdiscord.js - Imagine an app
Created by yuki on 8/21/2023 in #djs-questions
Attach files with @discordjs/rest
any idea?
10 replies
DIAdiscord.js - Imagine an app
Created by yuki on 8/21/2023 in #djs-questions
Attach files with @discordjs/rest
const attachment = ctx.message.attachments.at(0)!;
const img = await got.get(attachment.proxy_url).buffer();

const cache = cast<APIMessage>(await this.container.client.rest.post(Routes.channelMessages(), {
body: {
attachments: [
{
id: 0,
filename: attachment.filename
}
]
},
files: [
{
data: img,
name: attachment.filename,
contentType: attachment.content_type,
key: "0"
}
]
}));
const attachment = ctx.message.attachments.at(0)!;
const img = await got.get(attachment.proxy_url).buffer();

const cache = cast<APIMessage>(await this.container.client.rest.post(Routes.channelMessages(), {
body: {
attachments: [
{
id: 0,
filename: attachment.filename
}
]
},
files: [
{
data: img,
name: attachment.filename,
contentType: attachment.content_type,
key: "0"
}
]
}));
10 replies
DIAdiscord.js - Imagine an app
Created by yuki on 8/21/2023 in #djs-questions
Attach files with @discordjs/rest
it says no attachment found
10 replies