© 2026 Hedgehog Software, LLC
import { Piece, Store } from '@sapphire/framework'; export class InfrastructureDiscordServiceStore extends Store<Piece, 'infrastructure-discord-services'> { public constructor() { super(Piece, { name: 'infrastructure-discord-services' }); } }
const root = getRootData().root; this.stores.register(new InfrastructureDiscordServiceStore()).registerPath(join(root, 'infrastructure', 'discord', 'service'));
2025-05-26 10:39:14 - INFO - └─ Loaded 0 infrastructure-discord-services.
export class RoleService extends Piece { public constructor(context: Piece.LoaderContext, options: Piece.Options) { super(context, { ...options, name: 'role-service' }); } }
void this.stores.loadPiece({ store: 'infrastructure-discord-services', name: 'role-service', piece: RoleService });
2025-05-26 10:39:14 - INFO - └─ Loaded 6 infrastructure-discord-services.
this.stores.register(new InfrastructureDiscordServiceStore())
this.stores.register(this.server.routes)
this.server
registerPath
join(getRootData().root, nameOfTheStore)