https://github.com/mostfeatured/dbi-types
Patches dbi types for you to have auto complate while using locale.
https://github.com/mostfeatured/dbi-types
Last synced: about 1 month ago
JSON representation
Patches dbi types for you to have auto complate while using locale.
- Host: GitHub
- URL: https://github.com/mostfeatured/dbi-types
- Owner: MostFeatured
- Created: 2022-09-10T12:15:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T10:04:40.000Z (9 months ago)
- Last Synced: 2025-04-23T05:18:17.185Z (about 1 month ago)
- Language: JavaScript
- Size: 88.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NamespaceTypes
Patches dbi types for you to have auto complate while using locale, interactions and events.## Example
```js
const { createDBI } = require("@mostfeatured/dbi");
const { setNamespaceDataTypes } =require("@mostfeatured/namespace-types");const dbi = createDBI("dbi_namespace", {
discord: {
token: "Your Token Here",
options: {
intents: ["Guilds"]
}
}
});dbi.register(({ Locale, ChatInput }) => {
Locale({
name: "tr",
data: {
erdem: {
isim: "Erdem",
},
türk: "Türk",
}
});ChatInput({
name: "test",
description: "locale test",
onExecute({ locale }) {
locale.user.data.erdem.isim();
}
})
});(async () => {
await dbi.load();
setNamespaceDataTypes(dbi);
console.log("done")
})();
```