Doc
Doc
SIASapphire - Imagine a framework
Created by Doc on 3/17/2024 in #sapphire-support
Issue with path aliases not working when using imports (TypeScript)
@Favna by the way I also just wanna say... Thank you for all the effort and everything you've done and everyone else has done with this framework and everything associated with it. I've loved working with it and it's made developing my bot a very enjoyable and rewarding project. As a Discord bot developer that uses TypeScript, I greatly appreciate all the help you've given answering this question and the ones I've had in the past.
13 replies
SIASapphire - Imagine a framework
Created by Doc on 3/17/2024 in #sapphire-support
Issue with path aliases not working when using imports (TypeScript)
Yeah my apologies, I was tired and wasn't quite thorough in going over everything you said. I really appreciate the help in better understanding this so thank you
13 replies
SIASapphire - Imagine a framework
Created by Doc on 3/17/2024 in #sapphire-support
Issue with path aliases not working when using imports (TypeScript)
but I have modified my tsconfig.json slightly with the following in it:
{
"extends": ["@sapphire/ts-config", "@sapphire/ts-config/extra-strict", "@sapphire/ts-config/decorators"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"paths": {
"@lib/*": ["./src/lib/*"]
}
},

"include": ["src"],
"compileOnSave": true
}
{
"extends": ["@sapphire/ts-config", "@sapphire/ts-config/extra-strict", "@sapphire/ts-config/decorators"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"paths": {
"@lib/*": ["./src/lib/*"]
}
},

"include": ["src"],
"compileOnSave": true
}
13 replies
SIASapphire - Imagine a framework
Created by Doc on 3/17/2024 in #sapphire-support
Issue with path aliases not working when using imports (TypeScript)
also not sure if this is relevant, but i am using a tsconfig.eslint.json file as well with the following in it:
{
"extends": "./tsconfig.json",
"includes": ["src"]
}
{
"extends": "./tsconfig.json",
"includes": ["src"]
}
13 replies
SIASapphire - Imagine a framework
Created by Doc on 3/17/2024 in #sapphire-support
Issue with path aliases not working when using imports (TypeScript)
No description
13 replies
SIASapphire - Imagine a framework
Created by Doc on 3/17/2024 in #sapphire-support
Issue with path aliases not working when using imports (TypeScript)
it actually does allow me to import like that in some files, just not in others
13 replies
SIASapphire - Imagine a framework
Created by Doc on 3/17/2024 in #sapphire-support
Issue with path aliases not working when using imports (TypeScript)
ah okay gotcha
13 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
If you dont delete your dist folder after moving/removing a slash command it will continue to persist in the JS compiled /dist folder
23 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
It was half-not knowing that I needed to delete my /dist folder, and half-going on a completely wrong tangent to fix it. The setting default guilds thing was something I did hoping it would "reset" my bot's commands, at least for my server... Or something. Can't remember exactly what the logic was but I was sorta just breaking it until it worked again I guess lol
23 replies
SIASapphire - Imagine a framework
Created by Doc on 12/29/2023 in #sapphire-support
Best way to use Preconditions to determine which commands show up in a /help command?
Yeah the help command is meant just for showing available messageRun commands, and thank you for the link I definitely will <3
5 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
nvm I found the issue, I had set the following in client.ts file:
const guildIds = ['1175382045623586877']; ApplicationCommandRegistries.setDefaultGuildIds(guildIds);
const guildIds = ['1175382045623586877']; ApplicationCommandRegistries.setDefaultGuildIds(guildIds);
so the commands in my guild weren't updating after I removed that code. re-adding it has the issue sorted
23 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
does it take a while for the commands to refresh/re-register? because I'm still not seeing any changes with the /unban slash command despite deleting the dist folder and re-running my bot. I removed the unban.ts file entirely and removed the dist/ folder, but the slash command is still appearing, although the bot doesn't do anything when it's run
23 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
23 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
ah it's an extension, one sec ill link it
23 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
Ahhhhhh okay thank you so much, I just started getting into using TS and I didn't even think about that
23 replies
SIASapphire - Imagine a framework
Created by Doc on 11/28/2023 in #sapphire-support
Is there a way to use Sapphire to reset previously registered slash commands?
No description
23 replies