APRK01 commited on
Commit Β·
150765a
1
Parent(s): d78ded2
style: remove external link fallback for drop uploads completely
Browse files- src/systems/drops.js +2 -15
src/systems/drops.js
CHANGED
|
@@ -393,21 +393,8 @@ async function handleDropMessage(message) {
|
|
| 393 |
|
| 394 |
} catch (githubErr) {
|
| 395 |
console.error('[GitHub Upload Error]', githubErr);
|
| 396 |
-
await processingMsg.edit({ content: 'β *Failed to proxy storage to GitHub.
|
| 397 |
-
|
| 398 |
-
// Extremely drastic fallback
|
| 399 |
-
const fallbackEmbed = buildDropEmbed(session);
|
| 400 |
-
const fallbackRow = new ActionRowBuilder().addComponents(
|
| 401 |
-
new ButtonBuilder()
|
| 402 |
-
.setLabel('π₯ Download (External Link)')
|
| 403 |
-
.setStyle(ButtonStyle.Link)
|
| 404 |
-
.setURL(session.file.url)
|
| 405 |
-
);
|
| 406 |
-
await channel.send({
|
| 407 |
-
content: 'β οΈ *Note: This file was too large to attach securely and proxy storage failed. Using external link.*',
|
| 408 |
-
embeds: [fallbackEmbed],
|
| 409 |
-
components: [fallbackRow]
|
| 410 |
-
});
|
| 411 |
}
|
| 412 |
}
|
| 413 |
|
|
|
|
| 393 |
|
| 394 |
} catch (githubErr) {
|
| 395 |
console.error('[GitHub Upload Error]', githubErr);
|
| 396 |
+
await processingMsg.edit({ content: 'β *Failed to proxy storage to GitHub. The drop was cancelled.*' });
|
| 397 |
+
throw new Error('File too large for Discord and GitHub proxy failed.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
}
|
| 399 |
}
|
| 400 |
|