Build sapphirejs typescript project?
I'm new to sapphire and I am following the official guide on the website. However it only shows a file structure of JavaScript files. How can I set up the project to build using tsc?
4 Replies
You can generate a sample project with @aapphire/cli, of check out one of the various bots that already use typescript. Largely however it is the same as any other typescript project.
@sapphire/cli
CLI for Sapphire Framework
❯ Author: sapphiredev
❯ Maintainers: favna, kyranet, and vladfrangu
❯ Latest version: 1.4.0
❯ License: MIT
❯ Date Created: <t:1632429711:d>
❯ Date Modified: <t:1679794899:d>
Dependencies:
@favware/colorette-spinner, @sapphire/result, colorette, commander, execa, find-up, js-yaml, prompts, and tslib
Discord bots that use @sapphire/framework v4
- Official Bot Examples ᴱ ᴰ ᴶˢ
- Gemboard ᴱ ᴰ
- Dragonite ᴱ ᴰ
- Radon ᴱ ᴬ
- Sapphire Application Commands Examples ᴱ
- Archangel ᴱ ᴰ
- Zeyr ᴰ ᴬ
- Birthdayy ᴰ
- KBot ᴱ ᴬ ᴰ
Discord bots that use @sapphire/framework v3
- Arima ᴱ
- Nino ᴱ ᴰ
- Operator ᴱ ᴬ ᴰ
- Spectera ᴬ
Discord bots that use @sapphire/framework v2
- Materia ᴱ
- RTByte ᴱ ᴬ
- Skyra ᴬ ᴰ
- YliasDiscordBot ᴬ
ᴱ: Uses ESM (if not specified then uses CJS)
ᴬ: Advanced bot (if not specified it is a simple bot, or not graded)
ᴰ: Uses Docker in production
ᴶˢ: Written in JavaScript. If not specified then the bot is written in TypeScript.
ok thank you so much