Add the slopbot scaffold and discord.js dependency, unused

This commit is contained in:
Fisto
2026-09-16 07:59:51 +02:00
parent 148dd0a082
commit 92429f1e83
10 changed files with 315 additions and 6 deletions
+24
View File
@@ -0,0 +1,24 @@
/*
* Slopbot entry point.
*
* Scaffold only: the daemon does not import this yet. Checkpoint C4 adds the
* scrape backend; docs/slopbot.md is the module contract.
*/
import type { Client } from "discord.js";
import { loadSlopbotConfig, type SlopbotConfig } from "./config.js";
/** Kept as a type so the discord.js dependency is type-checked before C4 uses it. */
export type SlopbotClient = Client;
export { loadSlopbotConfig, type SlopbotConfig };
/** View Channels + Read Message History. The bot reads only; it never sends. */
const PERMISSIONS = String((1 << 10) | (1 << 16));
/** The invite URL the Bot tab renders once a client ID is configured. */
export function slopbotInviteUrl(clientId: string): string {
return `https://discord.com/oauth2/authorize?client_id=${encodeURIComponent(
clientId
)}&scope=bot%20applications.commands&permissions=${PERMISSIONS}`;
}