userinfo: forgor again
This commit is contained in:
parent
698ef3dc3e
commit
0e2ed94245
1 changed files with 4 additions and 7 deletions
|
|
@ -585,11 +585,8 @@ userinfo.callback = async function (msg, line) {
|
|||
|
||||
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,
|
||||
{
|
||||
const {upload_url, upload_filename} = await hf.bot.requestHandler
|
||||
.request("POST", APIEndpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(msg.channel.id), true, {
|
||||
files: [
|
||||
{
|
||||
file_size: video.length,
|
||||
|
|
@ -597,8 +594,8 @@ userinfo.callback = async function (msg, line) {
|
|||
...clip,
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
})
|
||||
.then((res) => res.attachments[0]);
|
||||
|
||||
await fetch(upload_url, {method: "PUT", body: video});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue