|
|
|
@ -478,7 +478,6 @@ exports.torrent = (bot)=>
|
|
|
|
|
{
|
|
|
|
|
collector.stop();
|
|
|
|
|
m.deferUpdate();
|
|
|
|
|
if(m.customId === 'Remove'+random) return m.message.delete();
|
|
|
|
|
let cookie = await fetch('https://utorrent.wordfights.com/api/v2/auth/login',
|
|
|
|
|
{
|
|
|
|
|
"headers":
|
|
|
|
@ -503,11 +502,28 @@ exports.torrent = (bot)=>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(!cookie) return
|
|
|
|
|
if(!cookie) return
|
|
|
|
|
|
|
|
|
|
if(m.customId === 'Remove'+random)
|
|
|
|
|
{
|
|
|
|
|
await fetch("https://utorrent.wordfights.com/api/v2/torrents/delete", {
|
|
|
|
|
"headers": {
|
|
|
|
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
|
|
"cookie":cookie,
|
|
|
|
|
},
|
|
|
|
|
"referrerPolicy": "same-origin",
|
|
|
|
|
"body": `hashes=${req.params.id}&deleteFiles=false`,
|
|
|
|
|
"method": "POST",
|
|
|
|
|
"mode": "cors",
|
|
|
|
|
"credentials": "include"
|
|
|
|
|
});
|
|
|
|
|
return m.message.delete();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await fetch("https://utorrent.wordfights.com/api/v2/torrents/setForceStart", {
|
|
|
|
|
"headers": {
|
|
|
|
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
|
|
"cookie": `${cookie}`,
|
|
|
|
|
"cookie": cookie,
|
|
|
|
|
},
|
|
|
|
|
"body": `value=true&hashes=${req.params.id}`,
|
|
|
|
|
"method": "POST"
|
|
|
|
|