Sandy Stone
Sandy Stone
Explore posts from servers
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
okok, that's it for now, tysm 🫶
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
yup that's what i was going to do
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
okok, would this be a bad approach for what i want to accomplish? are there better ways or this is already enough?
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
oh ok so i can't set custom paths or folder names for each store when doing this.stores.registerPath(join(this.rootData.root, 'cogs', 'audio')); basically, because sapphire would bind to the default namings which would be for example ìnteractions-handler
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
this.stores.get("commands").registerPath(path.join(this._rootData.root, "modules", "base", "cmds")); ??
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
so it'd have to be like this
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
here
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
yeah that's what i thought, and it's what i meant in the thread description 😭
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
wat
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
should work according to the paths in the custom client, specified here
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
No description
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
yup im using bun
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
this is my custom client, might be helpful
import { ApplicationCommandRegistries, RegisterBehavior, SapphireClient } from "@sapphire/framework";
import { container, getRootData } from "@sapphire/pieces";
import path from "path";
import { Settings } from "./settings";

export class Client extends SapphireClient {
private _isInitialized = false;
private _rootData = getRootData();

constructor() {
super({
intents: [],
baseUserDirectory: null,
});

this._init();
}

private _registerModule(name: string) {
this.stores.registerPath(path.join(this._rootData.root, "modules", name));
}

private _init() {
container.settings = new Settings();

this.stores.get("commands").registerPath(path.join(this._rootData.root, "cmds"));

this._registerModule("base");

ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);
ApplicationCommandRegistries.setDefaultGuildIds([container.settings.environment.discord.development.guildId]);

this._isInitialized = true;
}

get isInitialized() {
return this._isInitialized;
}
}

declare module "@sapphire/pieces" {
interface Container {
settings: Settings;
}
}
import { ApplicationCommandRegistries, RegisterBehavior, SapphireClient } from "@sapphire/framework";
import { container, getRootData } from "@sapphire/pieces";
import path from "path";
import { Settings } from "./settings";

export class Client extends SapphireClient {
private _isInitialized = false;
private _rootData = getRootData();

constructor() {
super({
intents: [],
baseUserDirectory: null,
});

this._init();
}

private _registerModule(name: string) {
this.stores.registerPath(path.join(this._rootData.root, "modules", name));
}

private _init() {
container.settings = new Settings();

this.stores.get("commands").registerPath(path.join(this._rootData.root, "cmds"));

this._registerModule("base");

ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);
ApplicationCommandRegistries.setDefaultGuildIds([container.settings.environment.discord.development.guildId]);

this._isInitialized = true;
}

get isInitialized() {
return this._isInitialized;
}
}

declare module "@sapphire/pieces" {
interface Container {
settings: Settings;
}
}
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
oh 😭
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
No description
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
No description
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
Alright, let me try
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
Yup, it is, yet it doesn't works 😭
65 replies
SIASapphire - Imagine a framework
Created by Sandy Stone on 8/19/2024 in #sapphire-support
Will the custom path in a store apply also when using cogs (or modules)?
So, it seems customizing the store's name doesn't works for cogs? How would I get them working?
65 replies