From 0f7d87edeea2f5102b06df1767e6fb4fd2480bfb Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Fri, 18 Jul 2025 23:43:01 -0600 Subject: [PATCH] userinfo: untry temp --- src/modules/utility/userinfo.js | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/modules/utility/userinfo.js b/src/modules/utility/userinfo.js index a1fbf0d..6b285bb 100644 --- a/src/modules/utility/userinfo.js +++ b/src/modules/utility/userinfo.js @@ -575,38 +575,38 @@ userinfo.callback = async function (msg, line) { } if (!member && id !== (msg.author?.id ?? msg.user?.id)) { - try { - const clip = { - is_clip: true, - clip_created_at: new Date().toISOString(), - clip_participant_ids: [id], - application_id: hf.bot.application?.id, - }; + //try { + const clip = { + is_clip: true, + clip_created_at: new Date().toISOString(), + clip_participant_ids: [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( - "POST", - APIEndpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(msg.channel.id), - true, - { - file_size: video.length, - filename: "clip.mp4", - ...clip, - } - ); - - await fetch(upload_url, {method: "PUT", body: video}); - - attachments.push({ + const {upload_url, upload_filename} = await hf.bot.requestHandler.request( + "POST", + APIEndpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(msg.channel.id), + true, + { + file_size: video.length, filename: "clip.mp4", - uploaded_filename: upload_filename, - is_thumbnail: true, ...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 {