An open API service indexing awesome lists of open source software.

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.

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")
})();
```