Skip to content

Patches dbi types for you to have auto complate while using locale.

Notifications You must be signed in to change notification settings

MostFeatured/dbi-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NamespaceTypes

Patches dbi types for you to have auto complate while using locale, interactions and events.

Example

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

About

Patches dbi types for you to have auto complate while using locale.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published