watchCord: fix tracking bugs, add Vencord Toolbox actions

- Seed voice channels and statuses on start and when adding a user so
  the first leave/move/status change is detected
- Match server-specific status entries by guild membership
- Webhooks never ping (allowed_mentions) and are capped at 2000 chars
- Throttle repeated typing events, reuse a single AudioContext
- Dedupe associated voice logs, stable ids for legacy entries,
  cache parsed watch list, escape newlines in log file
- Replace fragile toolbar patch with toolbox actions and a modal
- Migrate to new Heading/Paragraph/Button and Modal components
This commit is contained in:
X4Lo committed 2026-11-11 18:56:00 +00:00
1 parent f06f2f493b
commit bd8f826bb6
3 files changed
+157 -84

No files matched your search

+10 -2
View File
@@ -49,12 +49,20 @@ export async function sendWebhook(
content: string
): Promise<{ ok: boolean; error?: string }> {
try {
// Webhook messages are capped at 2000 characters
const safeContent = content.length > 2000 ? content.slice(0, 1997) + "..." : content;
const res = await fetch(webhookUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ content }),
body: JSON.stringify({
content: safeContent,
// Never ping anyone: logged messages may contain @everyone/@here or
// user mentions, and our own <@id> references should only render.
allowed_mentions: { parse: [] },
}),
});
return { ok: res.ok };
if (!res.ok) return { ok: false, error: `HTTP ${res.status}` };
return { ok: true };
} catch (e) {
return { ok: false, error: String(e) };
}