From d24e6e4190362a7e8385348713003ff92b482d33 Mon Sep 17 00:00:00 2001 From: masterhc Date: Sun, 21 Jul 2024 16:37:18 +0100 Subject: [PATCH] Feature: New button -> Aprove later. Just removes the interaction collector. --- controller/api.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/controller/api.js b/controller/api.js index 026fcde..f11eed1 100644 --- a/controller/api.js +++ b/controller/api.js @@ -470,6 +470,12 @@ exports.torrent = (bot)=> .setLabel('Remove') .setStyle(ButtonStyle.Danger), ) + .addComponents( + new ButtonBuilder() + .setCustomId('AproveLater'+random) + .setLabel('Aprove Later') + .setStyle(ButtonStyle.Success), + ) const filter = i => i.customId === 'Redirect'+random || i.customId === 'Remove'+random; let message = await user.send({embeds: [embed], components: [row] }); @@ -519,7 +525,7 @@ exports.torrent = (bot)=> }); return m.message.delete(); } - + if(m.customId === 'AproveLater'+random) return await fetch("https://utorrent.wordfights.com/api/v2/torrents/setForceStart", { "headers": { "content-type": "application/x-www-form-urlencoded; charset=UTF-8",