Configuration
Export defineConfig({...}) from popii.config.ts. Supply token from DISCORD_TOKEN, set owners, and configure discovery directories only when you do not use the defaults under src/.
Command synchronization is opt-in in production. Use popii sync during deployment, and use a development guild for rapid iteration. Configuration is validated before startup; invalid or conflicting persistence plugins stop startup with an actionable error.
Library code never owns process signals or calls process.exit(). Your entrypoint should call client.start() and arrange graceful client.stop() for its host process.
Text-command prefixes
Section titled “Text-command prefixes”Set prefix to a string for one guild text-command prefix, or return a string, an array of strings, or null from a per-message function:
export default defineConfig({ token: process.env.DISCORD_TOKEN!, prefix: "!",});Bot mentions are also accepted as prefixes. Prefix commands require Message Content Intent in the Discord Developer Portal. See Commands and options for parsing and dual-mode command examples.