Send to Discord: clear message on 413 (file over the channel's upload limit)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 21:16:07 +02:00
parent 6f5fe892da
commit 52203ab9d5
+1
View File
@@ -38,6 +38,7 @@ async function sendToDiscord(node) {
const j = await r.json().catch(() => ({}));
if (j?.ok) toast("success", "Sent to Discord");
else if (j?.status === 429) toast("error", "Discord rate-limited the webhook — wait a moment and retry");
else if (j?.status === 413) toast("error", "Too large for this channel's Discord upload limit (10MB free, more with server boosts)");
else toast("error", "Send failed: " + (j?.error || ("HTTP " + (j?.status ?? r.status))));
} catch (err) {
toast("error", "Send failed: " + err);