Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,29 @@ import { GatewayIntentBits, Partials } from "discord.js";

await client.connect(process.env.TOKEN);
})();

// If you need internationalisation:
import { initTranslations } from "@stelliajs/framework";

await use(Backend).init(
{
lng: StelliaLocale.English, // StelliaLocale is an enum with all the supported languages by Discord
backend: {
// With namespace: path.join(import.meta.dirname, "../locales/{{lng}}/{{ns}}.json")
loadPath: path.join(import.meta.dirname, "../locales/{{lng}}.json")
},
fallbackLng: StelliaLocale.English,
supportedLngs: Object.values(AmariLocale),
preload: Object.values(AmariLocale)
// ns: ["common", "commands", "errors"]
},
(error) => {
if (error) {
console.error(error);
}
}
);
initTranslations(i18next);
```

#### Environment model
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@stelliajs/framework",
"version": "1.7.3",
"version": "1.7.4",
"type": "module",
"description": "A framework for simplifying the creation of discord bots",
"author": "Tweenty_",
"license": "ISC",
"packageManager": "pnpm@11.1.3",
"packageManager": "pnpm@11.5.1",
"engines": {
"node": ">=24.0.0"
},
Expand Down Expand Up @@ -37,23 +37,23 @@
},
"peerDependencies": {
"discord.js": "^14.26.4",
"i18next": "26.2.0"
"i18next": "26.3.1"
},
"dependencies": {
"log-symbols": "^7.0.1"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"discord.js": "^14.26.4",
"eslint": "^10.4.0",
"eslint": "^10.4.1",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import-x": "^4.16.2",
"globals": "^17.6.0",
"jiti": "^2.7.0",
"prettier": "^3.8.3",
"tsdown": "^0.22.0",
"tsdown": "^0.22.1",
"typescript": "^6.0.3",
"typescript-eslint": "^8.59.4"
"typescript-eslint": "^8.60.1"
}
}
Loading