© 2026 Hedgehog Software, LLC
const client = new SapphireClient({ defaultPrefix: '!', caseInsensitiveCommands: true, logger: { level: LogLevel.Debug }, intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent ], loadMessageCommandListeners: true, api: { prefix: '/api/', origin: '*', automaticallyConnect: true, auth: { id: process.env.DISCORD_CLIENT_ID as string, secret: process.env.DISCORD_CLIENT_SECRET as string, cookie: 'SAPPHIRE_AUTH', redirect: process.env.DISCORD_REDIRECT_URI, scopes: [OAuth2Scopes.Identify, OAuth2Scopes.Guilds], domainOverwrite: process.env.NODE_ENV === 'development' ? '127.0.0.1' : undefined, transformers: [transformOauthGuilds] }, listenOptions: { port: 3000 } } });
$schema: "./node_modules/@sapphire/cli/templates/schemas/.sapphirerc.scheme.json" projectLanguage: "ts" locations: base: src arguments: arguments commands: commands listeners: listeners preconditions: preconditions interaction-handlers: interaction-handlers routes: api customFileTemplates: enabled: false location: ""
Join the Discord to ask follow-up questions and connect with the community
Sapphire is a next-gen object-oriented Discord.js bot framework.
2,286 Members