userinfo: forgor again

This commit is contained in:
Cynthia Foxwell 2025-07-18 23:45:52 -06:00
parent 698ef3dc3e
commit 0e2ed94245
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -585,11 +585,8 @@ userinfo.callback = async function (msg, line) {
const video = await readFile(require.resolve("#root/data/clip.mp4")); const video = await readFile(require.resolve("#root/data/clip.mp4"));
const {upload_url, upload_filename} = await hf.bot.requestHandler.request( const {upload_url, upload_filename} = await hf.bot.requestHandler
"POST", .request("POST", APIEndpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(msg.channel.id), true, {
APIEndpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(msg.channel.id),
true,
{
files: [ files: [
{ {
file_size: video.length, file_size: video.length,
@ -597,8 +594,8 @@ userinfo.callback = async function (msg, line) {
...clip, ...clip,
}, },
], ],
} })
); .then((res) => res.attachments[0]);
await fetch(upload_url, {method: "PUT", body: video}); await fetch(upload_url, {method: "PUT", body: video});