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 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});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue