Add the slopbot scaffold and discord.js dependency, unused
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
Reference in New Issue
Block a user