Files
Veskslop-t/media-scrape/slopbot/index.ts
T

25 lines
896 B
TypeScript

/*
* 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}`;
}