userinfo: untry temp

This commit is contained in:
Cynthia Foxwell 2025-07-18 23:43:01 -06:00
parent 4737ac23d6
commit 0f7d87edee
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -575,38 +575,38 @@ userinfo.callback = async function (msg, line) {
} }
if (!member && id !== (msg.author?.id ?? msg.user?.id)) { if (!member && id !== (msg.author?.id ?? msg.user?.id)) {
try { //try {
const clip = { const clip = {
is_clip: true, is_clip: true,
clip_created_at: new Date().toISOString(), clip_created_at: new Date().toISOString(),
clip_participant_ids: [id], clip_participant_ids: [id],
application_id: hf.bot.application?.id, application: hf.bot.application?.id,
}; };
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.request(
"POST", "POST",
APIEndpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(msg.channel.id), APIEndpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(msg.channel.id),
true, true,
{ {
file_size: video.length, file_size: video.length,
filename: "clip.mp4",
...clip,
}
);
await fetch(upload_url, {method: "PUT", body: video});
attachments.push({
filename: "clip.mp4", filename: "clip.mp4",
uploaded_filename: upload_filename,
is_thumbnail: true,
...clip, ...clip,
}); }
} catch { );
// noop
} await fetch(upload_url, {method: "PUT", body: video});
attachments.push({
filename: "clip.mp4",
uploaded_filename: upload_filename,
is_thumbnail: true,
...clip,
});
//} catch {
// noop
//}
} }
return { return {