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

27 lines
1.1 KiB
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 stays type-checked. */
export type SlopbotClient = Client;
export { loadSlopbotConfig, type SlopbotConfig };
export { mapSlopbotMessage, SlopbotBackend, type SlopbotFetcher } from "./backend.js";
export { slopbotFetcher, slopbotStatus, startSlopbot, stopSlopbot, type SlopbotStatus } from "./client.js";
/** 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}`;
}